Build Status

Cloud Discovery Kubernetes

A Kubernetes implementation of rust-cloud-discovery

Returns list of instances in a kubernetes service. The crate uses kubernetes endpoint API (/api/v1/namespaces/{namespace}/endpoints/{name}).

Usage

```rust use rustclouddiscovery::{DiscoveryClient, ServiceInstance}; use clouddiscoverykubernetes::KubernetesDiscoverService;

[tokio::main]

async fn main() { // initialize kubernetes client let k8s = KubernetesDiscoverService::init("demo".tostring(), "default".tostring()).await; if let Ok(k8s) = k8s { let client = DiscoveryClient::new(k8s); client.get_instances().await; } } ```