Exemple #1
0
        internal static IPingReport CreatePingReport(ClusterContext context, BucketConfig config, PingOptions options)
        {
            if (!options.ServiceTypes.Any())
            {
                options.WithServiceTypes(AllServiceTypes);
            }

            var clusterNodes = context.GetNodes(config.Name);
            var endpoints    = GetEndpointDiagnostics(context, clusterNodes, true, options.ServiceTypes, CancellationToken.None);

            return(new PingReport(options.ReportId, config.Rev, endpoints));
        }
Exemple #2
0
        internal static async Task <IPingReport> CreatePingReportAsync(ClusterContext context, BucketConfig config, PingOptions options)
        {
            if (!options.ServiceTypesValue.Any())
            {
                options.ServiceTypes(AllServiceTypes);
            }

            var clusterNodes = context.GetNodes(config.Name);
            var endpoints    =
                await GetEndpointDiagnosticsAsync(context, clusterNodes, true, options.ServiceTypesValue,
                                                  CancellationToken.None).ConfigureAwait(false);

            return(new PingReport(options.ReportIdValue ?? Guid.NewGuid().ToString(), config.Rev, endpoints));
        }