public static ClusterOptions AddTransientService <TService, TImplementation>(
     this ClusterOptions clusterOptions,
     Func <IServiceProvider, TImplementation> factory)
     where TImplementation : notnull, TService =>
 clusterOptions.AddService <TService, TImplementation>(factory, ClusterServiceLifetime.Transient);
 public static ClusterOptions AddClusterService <T>(
     this ClusterOptions clusterOptions,
     T singleton)
     where T : notnull =>
 clusterOptions.AddService <T, T>(_ => singleton, ClusterServiceLifetime.Cluster);
 public static ClusterOptions AddTransientService <TService, TImplementation>(
     this ClusterOptions clusterOptions)
     where TImplementation : TService =>
 clusterOptions.AddService <TService, TImplementation>(ClusterServiceLifetime.Transient);
 internal static HostEndpoint Create(ExternalAddressesConfig extAddressConfig, ClusterOptions options)
 {
     return(new HostEndpoint(extAddressConfig.Hostname,
                             options.EffectiveEnableTls ? extAddressConfig.Ports.KvSsl : extAddressConfig.Ports.Kv));
 }
 internal static HostEndpoint Create(NodesExt nodeExt, ClusterOptions options)
 {
     return(new HostEndpoint(nodeExt.Hostname,
                             options.EffectiveEnableTls ? nodeExt.Services.KvSsl : nodeExt.Services.Kv));
 }
 internal static HostEndpoint Create(NodeAdapter nodeAdapter, ClusterOptions options)
 {
     return(new HostEndpoint(nodeAdapter.Hostname,
                             options.EffectiveEnableTls ? nodeAdapter.KeyValueSsl : nodeAdapter.KeyValue));
 }
 public static ClusterOptions AddClusterService <TService, TImplementation>(
     this ClusterOptions clusterOptions,
     TImplementation singleton)
     where TImplementation : notnull, TService =>
 clusterOptions.AddService <TService, TImplementation>(_ => singleton, ClusterServiceLifetime.Cluster);