Versions in this module Expand all Collapse all v0 v0.0.0 Dec 28, 2022 Changes in this version + var ErrNoRoute = errors.New("no route found to handle given request") + var ErrPeerNoConnection = errors.New("no connection available for the peer") + var ErrPeeringDown = errors.New("Peering connection not available") + var ErrUnknownPeer = errors.New("no route to deliver") + func MsgLogString(msg Message) string + type Advertisement *generated.Advertisement + type AdvertisementProvider = func(ctx context.Context) (Advertisement, error) + type Forwarder interface + Close func(context.Context) error + type HTTPForwarder interface + NewRoundTripper func(cfg *config.HTTPIngressConfig) http.RoundTripper + type Ingress interface + Close func(ctx context.Context) error + String func() string + type Message = *generated.PeerMessage + type MessageHandler interface + Close func(ctx context.Context) error + type PeeringClient interface + Close func(ctx context.Context) error + Stat func() PeeringClientStat + String func() string + type PeeringClientStat struct + HandshakeAttempts uint64 + HandshakeSucceeded uint64 + PeerMessageReceived uint64 + PeeringAttempts uint64 + PeeringConnected uint64 + func (stat *PeeringClientStat) Clone() PeeringClientStat + func (stat PeeringClientStat) String() string + type PeeringServer interface + Close func(ctx context.Context) error + Port func() int + Stat func() PeeringServerStat + String func() string + type PeeringServerStat struct + HandshakeAttempts uint64 + HandshakeSucceeded uint64 + PeerMessageReceived uint64 + PeeringConnections uint64 + func (stat *PeeringServerStat) Clone() PeeringServerStat + func (stat PeeringServerStat) String() string + type PingForwarder interface + Ping func(ctx context.Context, dest config.NodeID, timeout time.Duration) error + type Router interface + Close func(ctx context.Context) error + Deliver func(ctx context.Context, from config.NodeID, dest config.NodeID, msg Message) + GenerateAdvertisement func(ctx context.Context) (Advertisement, error) + Listen func(callback RouterListener) RouterUnregister + NodeID func() config.NodeID + RegisterSink func(dest config.NodeID, callback RouterShink) RouterUnregister + Route func(ctx context.Context, request Message) (config.NodeID, error) + SetAdvertisementProvider func(advFn AdvertisementProvider) + Update func(ctx context.Context, node config.NodeID, ad Advertisement) + type RouterListener = func(ctx context.Context, from config.NodeID, msg Message) error + type RouterShink = func(context.Context, Message) error + type RouterUnregister = func()