Skip to content

Instantly share code, notes, and snippets.

View abhirag's full-sized avatar

abhirag abhirag

View GitHub Profile
@Object905
Object905 / discovery.rs
Created March 14, 2024 10:51
Pingora kubernetes discovery example
use std::collections::{BTreeSet, HashMap};
use std::net::{IpAddr, Ipv4Addr, SocketAddrV4};
use std::pin::Pin;
use std::str::FromStr;
use std::sync::atomic::Ordering;
use std::sync::Arc;
use async_trait::async_trait;
use atomic_option::AtomicOption;
use futures::future::{select, Either};