Versions in this module Expand all Collapse all v1 v1.4.5 Jul 11, 2021 Changes in this version + const DefaultMaxMessageSize + var Messages = map[Op][]Field + func TLSConfig(cert tls.Certificate) *tls.Config + type Builder struct + func (m Builder) Accepted(chainID ids.ID, requestID uint32, containerIDs []ids.ID) (Msg, error) + func (m Builder) AcceptedFrontier(chainID ids.ID, requestID uint32, containerIDs []ids.ID) (Msg, error) + func (m Builder) Chits(chainID ids.ID, requestID uint32, containerIDs []ids.ID) (Msg, error) + func (m Builder) Get(chainID ids.ID, requestID uint32, deadline uint64, containerID ids.ID) (Msg, error) + func (m Builder) GetAccepted(chainID ids.ID, requestID uint32, deadline uint64, containerIDs []ids.ID) (Msg, error) + func (m Builder) GetAcceptedFrontier(chainID ids.ID, requestID uint32, deadline uint64) (Msg, error) + func (m Builder) GetAncestors(chainID ids.ID, requestID uint32, deadline uint64, containerID ids.ID) (Msg, error) + func (m Builder) GetPeerList() (Msg, error) + func (m Builder) GetVersion() (Msg, error) + func (m Builder) MultiPut(chainID ids.ID, requestID uint32, containers [][]byte) (Msg, error) + func (m Builder) PeerList(peers []utils.IPCertDesc) (Msg, error) + func (m Builder) Ping() (Msg, error) + func (m Builder) Pong() (Msg, error) + func (m Builder) PullQuery(chainID ids.ID, requestID uint32, deadline uint64, containerID ids.ID) (Msg, error) + func (m Builder) PushQuery(chainID ids.ID, requestID uint32, deadline uint64, containerID ids.ID, ...) (Msg, error) + func (m Builder) Put(chainID ids.ID, requestID uint32, containerID ids.ID, container []byte) (Msg, error) + func (m Builder) Version(networkID, nodeID uint32, myTime uint64, ip utils.IPDesc, myVersion string, ...) (Msg, error) + type Codec struct + func (Codec) Pack(op Op, fields map[Field]interface{}) (Msg, error) + func (Codec) Parse(b []byte) (Msg, error) + type ConnMeter interface + Register func(addr string) (int, error) + func NewConnMeter(resetDuration time.Duration, size int) ConnMeter + type Dialer interface + Dial func(utils.IPDesc) (net.Conn, error) + func NewDialer(network string) Dialer + type Field uint32 + const ChainID + const ContainerBytes + const ContainerID + const ContainerIDs + const Deadline + const IP + const MultiContainerBytes + const MyTime + const NetworkID + const NodeID + const Peers + const RequestID + const SigBytes + const SignedPeers + const VersionStr + const VersionTime + func (f Field) Packer() func(*wrappers.Packer, interface{}) + func (f Field) String() string + func (f Field) Unpacker() func(*wrappers.Packer) interface{} + type HealthConfig struct + MaxPortionSendQueueBytesFull float64 + MaxSendFailRate float64 + MaxSendFailRateHalflife time.Duration + MaxTimeSinceMsgReceived time.Duration + MaxTimeSinceMsgSent time.Duration + MinConnectedPeers uint + type Msg interface + Bytes func() []byte + Get func(Field) interface{} + Op func() Op + type Network interface + Close func() error + Dispatch func() error + IP func() utils.IPDesc + Peers func(nodeIDs []ids.ShortID) []PeerID + Track func(ip utils.IPDesc, nodeID ids.ShortID) + TrackIP func(ip utils.IPDesc) + func NewDefaultNetwork(registerer prometheus.Registerer, log logging.Logger, id ids.ShortID, ...) Network + func NewNetwork(registerer prometheus.Registerer, log logging.Logger, id ids.ShortID, ...) Network + type Op byte + const Accepted + const AcceptedFrontier + const Chits + const Get + const GetAccepted + const GetAcceptedFrontier + const GetAncestors + const GetPeerList + const GetVersion + const MultiPut + const PeerList + const Ping + const Pong + const PullQuery + const PushQuery + const Put + const Version + func (op Op) String() string + type PeerElement struct + type PeerID struct + Benched []ids.ID + ID string + IP string + LastReceived time.Time + LastSent time.Time + PublicIP string + Up bool + Version string + type Upgrader interface + Upgrade func(net.Conn) (ids.ShortID, net.Conn, *x509.Certificate, error) + func NewTLSClientUpgrader(config *tls.Config) Upgrader + func NewTLSServerUpgrader(config *tls.Config) Upgrader