Documentation
¶
Index ¶
- Constants
- func DisableOption() func() libp2p.Option
- func EnableAutoRelayWithStaticRelays(static []warpnet.PeerAddrInfo, currentNodeID warpnet.WarpPeerID) func() libp2p.Option
- func WithDefaultTCPConnectionTimeout(t time.Duration) warpnet.TCPOption
- func WithDialTimeout(t time.Duration) warpnet.SwarmOption
- func WithDialTimeoutLocal(t time.Duration) warpnet.SwarmOption
- type Streamer
- type WarpNode
- func (n *WarpNode) Connect(p warpnet.PeerAddrInfo) error
- func (n *WarpNode) Mux() warpnet.WarpProtocolSwitch
- func (n *WarpNode) Network() warpnet.WarpNetwork
- func (n *WarpNode) Node() warpnet.P2PNode
- func (n *WarpNode) NodeInfo() warpnet.NodeInfo
- func (n *WarpNode) Peerstore() warpnet.WarpPeerstore
- func (n *WarpNode) SetStreamHandler(route stream.WarpRoute, handler warpnet.WarpStreamHandler)
- func (n *WarpNode) StopNode()
- func (n *WarpNode) Stream(nodeId warpnet.WarpPeerID, path stream.WarpRoute, data any) (_ []byte, err error)
Constants ¶
View Source
const DefaultTimeout = 60 * time.Second
View Source
const ErrSelfRequest = warpnet.WarpError("self request is not allowed")
Variables ¶
This section is empty.
Functions ¶
func DisableOption ¶
func EnableAutoRelayWithStaticRelays ¶
func EnableAutoRelayWithStaticRelays(static []warpnet.PeerAddrInfo, currentNodeID warpnet.WarpPeerID) func() libp2p.Option
func WithDialTimeout ¶
func WithDialTimeout(t time.Duration) warpnet.SwarmOption
func WithDialTimeoutLocal ¶
func WithDialTimeoutLocal(t time.Duration) warpnet.SwarmOption
Types ¶
type WarpNode ¶
type WarpNode struct {
// contains filtered or unexported fields
}
func NewWarpNode ¶
func (*WarpNode) Mux ¶
func (n *WarpNode) Mux() warpnet.WarpProtocolSwitch
func (*WarpNode) Network ¶
func (n *WarpNode) Network() warpnet.WarpNetwork
func (*WarpNode) Peerstore ¶
func (n *WarpNode) Peerstore() warpnet.WarpPeerstore
func (*WarpNode) SetStreamHandler ¶
func (n *WarpNode) SetStreamHandler(route stream.WarpRoute, handler warpnet.WarpStreamHandler)
Click to show internal directories.
Click to hide internal directories.