go-libp2p-rendezvous/sync_iface.go
gfanton e0c189e5e9 chore: fix import
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
2022-11-08 18:30:19 +01:00

23 lines
500 B
Go

package rendezvous
import (
"context"
"github.com/libp2p/go-libp2p/core/peer"
)
type RendezvousSync interface {
Register(p peer.ID, ns string, addrs [][]byte, ttl int, counter uint64)
Unregister(p peer.ID, ns string)
}
type RendezvousSyncSubscribable interface {
Subscribe(ns string) (syncDetails string, err error)
GetServiceType() string
}
type RendezvousSyncClient interface {
Subscribe(ctx context.Context, syncDetails string) (<-chan *Registration, error)
GetServiceType() string
}