Class KubernetesDiscoveryClient
- Namespace
- Steeltoe.Discovery.Kubernetes.Discovery
- Assembly
- Steeltoe.Discovery.Kubernetes.dll
[Obsolete("This feature will be removed in the next major version. See https://steeltoe.io/docs/v3/obsolete for details.")]
public class KubernetesDiscoveryClient : IDiscoveryClient, IServiceInstanceProvider
- Inheritance
-
KubernetesDiscoveryClient
- Implements
- Inherited Members
Constructors
KubernetesDiscoveryClient(DefaultIsServicePortSecureResolver, IKubernetes, IOptionsMonitor<KubernetesDiscoveryOptions>, ILogger<KubernetesDiscoveryClient>)
public KubernetesDiscoveryClient(DefaultIsServicePortSecureResolver isServicePortSecureResolver, IKubernetes kubernetesClient, IOptionsMonitor<KubernetesDiscoveryOptions> discoveryOptions, ILogger<KubernetesDiscoveryClient> logger = null)
Parameters
isServicePortSecureResolverDefaultIsServicePortSecureResolverkubernetesClientIKubernetesdiscoveryOptionsIOptionsMonitor<KubernetesDiscoveryOptions>loggerILogger<KubernetesDiscoveryClient>
Properties
Description
Gets a human readable description of the implementation
public string Description { get; }
Property Value
KubernetesClient
public IKubernetes KubernetesClient { get; set; }
Property Value
Services
Gets all known service Ids
public IList<string> Services { get; }
Property Value
Methods
EnsureAssemblyIsLoaded()
Use this method to prevent Steeltoe.Discovery.Kubernetes from being optimized out of the build
public static void EnsureAssemblyIsLoaded()
GetInstances(string)
Get all ServiceInstances associated with a particular serviceId
public IList<IServiceInstance> GetInstances(string serviceId)
Parameters
serviceIdstringthe serviceId to lookup
Returns
- IList<IServiceInstance>
List of service instances
GetLocalServiceInstance()
ServiceInstance with information used to register the local service
public IServiceInstance GetLocalServiceInstance()
Returns
- IServiceInstance
The IServiceInstance
GetServices(IDictionary<string, string>)
public IList<string> GetServices(IDictionary<string, string> labels)
Parameters
labelsIDictionary<string, string>
Returns
ShutdownAsync()
public Task ShutdownAsync()