Table of Contents

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

isServicePortSecureResolver DefaultIsServicePortSecureResolver
kubernetesClient IKubernetes
discoveryOptions IOptionsMonitor<KubernetesDiscoveryOptions>
logger ILogger<KubernetesDiscoveryClient>

Properties

Description

Gets a human readable description of the implementation

public string Description { get; }

Property Value

string

KubernetesClient

public IKubernetes KubernetesClient { get; set; }

Property Value

IKubernetes

Services

Gets all known service Ids

public IList<string> Services { get; }

Property Value

IList<string>

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

serviceId string

the 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

labels IDictionary<string, string>

Returns

IList<string>

ShutdownAsync()

public Task ShutdownAsync()

Returns

Task