Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PeerDiff ¶ added in v1.3.11
func PeerDiff(oldPeers GossipPeers, newPeers GossipPeers) (peersToRemove GossipPeers, peersToAdd GossipPeers)
Types ¶
type GossipPeer ¶ added in v1.3.11
func NewGossipPeer ¶ added in v1.3.11
func NewGossipPeer(gossipPort int, gossipEndpoint string, hexAddress string) GossipPeer
type GossipPeers ¶ added in v1.3.11
type GossipPeers map[string]GossipPeer
type InterceptableTransport ¶ added in v1.3.0
type InterceptableTransport interface { Transport SendWithInterceptor(ctx context.Context, data *TransportData, intercept InterceptorFunc) error }
type InterceptorFunc ¶ added in v1.3.0
type InterceptorFunc func(ctx context.Context, peerAddress primitives.NodeAddress, data *TransportData, transmit TransmitFunc) error
type TransmitFunc ¶ added in v1.3.0
type TransmitFunc func(ctx context.Context, peerAddress primitives.NodeAddress, data *TransportData)
type Transport ¶
type Transport interface { supervised.GracefulShutdowner govnr.ShutdownWaiter RegisterListener(listener TransportListener, listenerNodeAddress primitives.NodeAddress) Send(ctx context.Context, data *TransportData) error // TODO don't return error. misleading meaning. use panics instead UpdateTopology(bgCtx context.Context, newPeers GossipPeers) }
type TransportData ¶
type TransportData struct { SenderNodeAddress primitives.NodeAddress RecipientMode gossipmessages.RecipientsListMode RecipientNodeAddresses []primitives.NodeAddress Payloads [][]byte // the first payload is normally gossipmessages.Header }
func (*TransportData) Clone ¶ added in v1.3.0
func (d *TransportData) Clone() *TransportData
func (*TransportData) TotalSize ¶ added in v0.7.11
func (d *TransportData) TotalSize() (res int)
Directories
¶
Path | Synopsis |
---|---|
Package memory provides an in-memory implementation of the Gossip Transport adapter, meant for usage in fast tests that should not use the TCP-based adapter, such as acceptance tests or sociable unit tests, or in other in-process network use cases
|
Package memory provides an in-memory implementation of the Gossip Transport adapter, meant for usage in fast tests that should not use the TCP-based adapter, such as acceptance tests or sociable unit tests, or in other in-process network use cases |
Package testkit extends the in-process transport adapter with Tampering capabilities, intended to be used by system-wide acceptance tests
|
Package testkit extends the in-process transport adapter with Tampering capabilities, intended to be used by system-wide acceptance tests |
Click to show internal directories.
Click to hide internal directories.