Documentation
¶
Index ¶
- Constants
- func NewBootstrapDiscoveryService(ctx context.Context, handlers ...DiscoveryHandler) *discoveryService
- func NewDiscoveryService(ctx context.Context, userRepo UserStorer, nodeRepo NodeStorer, ...) *discoveryService
- type DiscoveryHandler
- type DiscoveryInfoStorer
- type NodeStorer
- type UserStorer
Constants ¶
View Source
const ( ErrChallengeMismatch warpnet.WarpError = "challenge mismatch" ErrChallengeSignatureInvalid warpnet.WarpError = "invalid challenge signature" )
Variables ¶
This section is empty.
Functions ¶
func NewBootstrapDiscoveryService ¶
func NewBootstrapDiscoveryService(ctx context.Context, handlers ...DiscoveryHandler) *discoveryService
func NewDiscoveryService ¶
func NewDiscoveryService( ctx context.Context, userRepo UserStorer, nodeRepo NodeStorer, handlers ...DiscoveryHandler, ) *discoveryService
Types ¶
type DiscoveryHandler ¶
type DiscoveryHandler func(warpnet.PeerAddrInfo)
type DiscoveryInfoStorer ¶
type DiscoveryInfoStorer interface {
NodeInfo() warpnet.NodeInfo
Peerstore() warpnet.WarpPeerstore
Mux() warpnet.WarpProtocolSwitch
Network() warpnet.WarpNetwork
Connect(p warpnet.PeerAddrInfo) error
GenericStream(nodeId string, path stream.WarpRoute, data any) ([]byte, error)
}
type NodeStorer ¶
Click to show internal directories.
Click to hide internal directories.