Versions in this module Expand all Collapse all v0 v0.1.0 Jun 22, 2023 Changes in this version + const MaxMessageLength + const MaxStreamNameLength + const MaxStreamsPerPeer + type Discoverer interface + Close func() error + FindPeer func(peer types.PeerID) ([]types.Address, error) + Start func(host *Host, privKey ed25519.PrivateKey, logger loghelper.LoggerWithContext) error + type Host struct + func NewHost(config HostConfig, secretKey ed25519.PrivateKey, listenAddresses []string, ...) (*Host, error) + func (ho *Host) Close() error + func (ho *Host) ID() types.PeerID + func (ho *Host) NewStream(other types.PeerID, streamName string, outgoingBufferSize int, ...) (*Stream, error) + func (ho *Host) Start() error + type HostConfig struct + DurationBetweenDials time.Duration + type Stream struct + func (st *Stream) Close() error + func (st *Stream) Name() string + func (st *Stream) Other() types.PeerID + func (st *Stream) ReceiveMessages() <-chan []byte + func (st *Stream) SendMessage(data []byte) + type TokenBucketParams struct + Capacity uint32 + Rate float64