Versions in this module Expand all Collapse all v0 v0.5.1 Aug 5, 2024 v0.5.0 Jun 19, 2023 v0.4.1 Jan 16, 2023 Changes in this version + var DefaultAddrFactory = func(addrs []ma.Multiaddr) []ma.Multiaddr + type AddrsFactory func(addrs []ma.Multiaddr) []ma.Multiaddr + type RendezvousPointOption func(cfg *rendezvousPointConfig) + func ClientWithAddrsFactory(factory AddrsFactory) RendezvousPointOption v0.4.0 Nov 15, 2022 Changes in this version + const DefaultTTL + const MaxDiscoverLimit + const MaxNamespaceLength + const MaxPeerAddressLength + const MaxRegistrations + const MaxTTL + const RendezvousProto + const ServiceProto + const ServiceType + var DiscoverAsyncInterval = 2 * time.Minute + func NewDiscoverMessage(ns string, limit int, cookie []byte) *pb.Message + func NewRegisterMessage(ns string, pi peer.AddrInfo, ttl int) *pb.Message + func NewRendezvousDiscovery(host host.Host, rendezvousPeer peer.ID) discovery.Discovery + func NewSyncInMemClient(ctx context.Context, h host.Host) *client + type PubSub struct + func NewSyncInMemProvider(host host.Host) (*PubSub, error) + func (ps *PubSub) GetServiceType() string + func (ps *PubSub) Listen() + func (ps *PubSub) Register(pid peer.ID, ns string, addrs [][]byte, ttlAsSeconds int, counter uint64) + func (ps *PubSub) Subscribe(ns string) (syncDetails string, err error) + func (ps *PubSub) Unregister(p peer.ID, ns string) + type PubSubSubscribers struct + type PubSubSubscriptionDetails struct + ChannelName string + PeerID string + type Registration struct + Ns string + Peer peer.AddrInfo + Ttl int + type RendezvousClient interface + Discover func(ctx context.Context, ns string, limit int, cookie []byte) ([]peer.AddrInfo, []byte, error) + DiscoverAsync func(ctx context.Context, ns string) (<-chan peer.AddrInfo, error) + DiscoverSubscribe func(ctx context.Context, ns string) (<-chan peer.AddrInfo, error) + Register func(ctx context.Context, ns string, ttl int) (time.Duration, error) + Unregister func(ctx context.Context, ns string) error + func NewRendezvousClient(host host.Host, rp peer.ID, sync ...RendezvousSyncClient) RendezvousClient + func NewRendezvousClientWithPoint(rp RendezvousPoint, syncClientList ...RendezvousSyncClient) RendezvousClient + type RendezvousError struct + Status pb.Message_ResponseStatus + Text string + func (e RendezvousError) Error() string + type RendezvousPoint interface + Discover func(ctx context.Context, ns string, limit int, cookie []byte) ([]Registration, []byte, error) + DiscoverAsync func(ctx context.Context, ns string) (<-chan Registration, error) + DiscoverSubscribe func(ctx context.Context, ns string, serviceTypes []RendezvousSyncClient) (<-chan peer.AddrInfo, error) + Register func(ctx context.Context, ns string, ttl int) (time.Duration, error) + Unregister func(ctx context.Context, ns string) error + func NewRendezvousPoint(host host.Host, p peer.ID) RendezvousPoint + type RendezvousService struct + DB db.DB + func NewRendezvousService(host host.Host, db db.DB, rzs ...RendezvousSync) *RendezvousService + type RendezvousSync interface + Register func(p peer.ID, ns string, addrs [][]byte, ttl int, counter uint64) + Unregister func(p peer.ID, ns string) + type RendezvousSyncClient interface + GetServiceType func() string + Subscribe func(ctx context.Context, syncDetails string) (<-chan *Registration, error) + type RendezvousSyncSubscribable interface + GetServiceType func() string + Subscribe func(ns string) (syncDetails string, err error)