Documentation ¶
Index ¶
Constants ¶
View Source
const ConnectingTimeout = 20 * time.Second //todo: add to the config
ConnectingTimeout is the timeout we wait when trying to connect a neighborhood
View Source
const NoResultsInterval = 1 * time.Second
NoResultsInterval is the timeout we wait between requesting more peers repeatedly
Variables ¶
View Source
var ( // ErrBadFormat1 could'nt deserialize the payload ErrBadFormat1 = errors.New("bad msg format, could'nt deserialize 1") // ErrBadFormat2 could'nt deserialize the protocol message payload ErrBadFormat2 = errors.New("bad msg format, could'nt deserialize 2") // ErrOutOfSync is returned when messsage timestamp was out of sync ErrOutOfSync = errors.New("received out of sync msg") // ErrFailDecrypt session cant decrypt ErrFailDecrypt = errors.New("can't decrypt message payload with session key") // ErrAuthAuthor message sign is wrong ErrAuthAuthor = errors.New("failed to verify author") // ErrNoProtocol we don't have the protocol message ErrNoProtocol = errors.New("received msg to an unsupported protocol") // ErrNoSession we don't have this session ErrNoSession = errors.New("connection is missing a session") // ErrNotFromPeer - we got message singed with a different publickkey and its not gossip ErrNotFromPeer = errors.New("this message was signed with the wrong public key") )
Functions ¶
This section is empty.
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package delimited implements a reader and writer for simple streams of length-delimited byte records.
|
Package delimited implements a reader and writer for simple streams of length-delimited byte records. |
Package dht implements a Distributed Hash Table based on Kademlia protocol.
|
Package dht implements a Distributed Hash Table based on Kademlia protocol. |
Click to show internal directories.
Click to hide internal directories.