Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eipi1/cloud-discovery-kubernetes
Kubernetes implementation of rust-cloud-discovery
https://github.com/eipi1/cloud-discovery-kubernetes
discovery-client discovery-service kubernetes-discovery rust-discovery-service
Last synced: about 2 months ago
JSON representation
Kubernetes implementation of rust-cloud-discovery
- Host: GitHub
- URL: https://github.com/eipi1/cloud-discovery-kubernetes
- Owner: eipi1
- License: mit
- Created: 2021-04-13T16:21:51.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-10T11:19:30.000Z (about 2 years ago)
- Last Synced: 2024-04-24T00:28:58.173Z (8 months ago)
- Topics: discovery-client, discovery-service, kubernetes-discovery, rust-discovery-service
- Language: Rust
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Build](https://github.com/eipi1/cloud-discovery-kubernetes/actions/workflows/rust.yml/badge.svg)
[![Crates.io][crates-badge]][crates-url]
[![MIT licensed][mit-badge]][mit-url]## Cloud Discovery Kubernetes
A Kubernetes implementation of [rust-cloud-discovery](https://github.com/eipi1/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 rust_cloud_discovery::{DiscoveryClient, ServiceInstance};
use cloud_discovery_kubernetes::KubernetesDiscoverService;
#[tokio::main]
async fn main() {
// initialize kubernetes client
let k8s = KubernetesDiscoverService::init("demo".to_string(), "default".to_string()).await;
if let Ok(k8s) = k8s {
let client = DiscoveryClient::new(k8s);
client.get_instances().await;
}
}
```[crates-badge]: https://img.shields.io/crates/v/cloud-discovery-kubernetes.svg
[crates-url]: https://crates.io/crates/cluster-mode
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
[mit-url]: https://github.com/tokio-rs/tokio/blob/master/LICENSE