Versions in this module Expand all Collapse all v0 v0.0.18 Feb 6, 2024 Changes in this version + const KeyTTL + type Bootstrapper interface + Get func() (*peer.AddrInfo, error) + Run func(ctx context.Context, id string) error + func NewKubernetesBootstrapper(cs kubernetes.Interface, namespace, name string) Bootstrapper + type HTTPBootstrapper struct + func NewHTTPBootstrapper(addr, peer string) *HTTPBootstrapper + func (h *HTTPBootstrapper) Get() (*peer.AddrInfo, error) + func (h *HTTPBootstrapper) Run(ctx context.Context, id string) error + type KubernetesBootstrapper struct + func (k *KubernetesBootstrapper) Get() (*peer.AddrInfo, error) + func (k *KubernetesBootstrapper) Run(ctx context.Context, id string) error + type MockRouter struct + func NewMockRouter(resolver map[string][]netip.AddrPort, self netip.AddrPort) *MockRouter + func (m *MockRouter) Advertise(ctx context.Context, keys []string) error + func (m *MockRouter) LookupKey(key string) ([]netip.AddrPort, bool) + func (m *MockRouter) Ready() (bool, error) + func (m *MockRouter) Resolve(ctx context.Context, key string, allowSelf bool, count int) (<-chan netip.AddrPort, error) + type P2PRouter struct + func NewP2PRouter(ctx context.Context, addr string, bootstrapper Bootstrapper, ...) (*P2PRouter, error) + func (r *P2PRouter) Advertise(ctx context.Context, keys []string) error + func (r *P2PRouter) Close() error + func (r *P2PRouter) Ready() (bool, error) + func (r *P2PRouter) Resolve(ctx context.Context, key string, allowSelf bool, count int) (<-chan netip.AddrPort, error) + func (r *P2PRouter) Run(ctx context.Context) error + type Router interface + Advertise func(ctx context.Context, keys []string) error + Ready func() (bool, error) + Resolve func(ctx context.Context, key string, allowSelf bool, count int) (<-chan netip.AddrPort, error)