Documentation ¶
Index ¶
- type AddressManager
- type MisbehaveResult
- type Misbehavior
- type Protocol
- func (p *Protocol) Connected(ctx *tentacle.ProtocolContextRef, version string)
- func (p *Protocol) Disconnected(ctx *tentacle.ProtocolContextRef)
- func (p *Protocol) Init(ctx *tentacle.ProtocolContext)
- func (p *Protocol) Notify(ctx *tentacle.ProtocolContext, token uint64)
- func (p *Protocol) Received(ctx *tentacle.ProtocolContextRef, data []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressManager ¶
type AddressManager interface { AddNewAddr(tentacle.SessionID, multiaddr.Multiaddr) AddNewAddrs(tentacle.SessionID, []multiaddr.Multiaddr) Misbehave(tentacle.SessionID, Misbehavior) *MisbehaveResult GetRandom(int) []multiaddr.Multiaddr }
AddressManager ..
type MisbehaveResult ¶
type MisbehaveResult struct {
// contains filtered or unexported fields
}
MisbehaveResult report result
type Misbehavior ¶
type Misbehavior struct {
// contains filtered or unexported fields
}
Misbehavior to report to underlying peer storage
func (*Misbehavior) String ¶
func (m *Misbehavior) String() string
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
Protocol discovery protocol stuct
func NewProtocol ¶
func NewProtocol(addrMgr AddressManager, queryCycle time.Duration, checkInterval time.Duration, globalIPOnly bool) *Protocol
NewProtocol create a discovery protocol
func (*Protocol) Disconnected ¶
func (p *Protocol) Disconnected(ctx *tentacle.ProtocolContextRef)
Disconnected ..
Click to show internal directories.
Click to hide internal directories.