Documentation ¶
Index ¶
- Variables
- type ConnectedClients
- type PeerGraph
- type PeerMap
- func (s *PeerMap) CRC64() uint64
- func (s *PeerMap) Get(peer uint64) multiplexer.Peer
- func (s *PeerMap) Has(peer uint64) bool
- func (s *PeerMap) Len() int
- func (s *PeerMap) NewPeer(ctx context.Context, proto protocol.Protocol, conf multiplexer.Config) error
- func (s *PeerMap) Notify() <-chan multiplexer.Peer
- func (s *PeerMap) Print()
- func (s *PeerMap) Remove(peer uint64) error
- func (s *PeerMap) Snapshot() []uint64
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSessionAlreadyEstablished = fmt.Errorf("already have a session with this peer")
)
Functions ¶
This section is empty.
Types ¶
type ConnectedClients ¶
ConnectedClients is used when memberlist does TCP push/pull state synchronization. It is used to notify the querying peer with a binary fuse filter.
func NewConnectedClients ¶ added in v0.6.0
func NewConnectedClients(peer uint64, clients []uint64) (*ConnectedClients, error)
func (*ConnectedClients) Has ¶ added in v0.6.0
func (c *ConnectedClients) Has(client uint64) bool
func (*ConnectedClients) MarshalBinary ¶ added in v0.6.0
func (c *ConnectedClients) MarshalBinary() ([]byte, error)
func (*ConnectedClients) UnmarshalBinary ¶ added in v0.6.0
func (c *ConnectedClients) UnmarshalBinary(b []byte) error
type PeerGraph ¶
type PeerGraph struct {
// contains filtered or unexported fields
}
func NewPeerGraph ¶
func (*PeerGraph) Replace ¶
func (p *PeerGraph) Replace(c ConnectedClients) (modified bool)
type PeerMap ¶
type PeerMap struct {
// contains filtered or unexported fields
}
PeerMap maintains the mapping between a Peer and their corresponding *multiplexer.Peer connection. Although Peers are discovered via gossip, who gets to initiate the connection is decided by the ordinality of their PeerIDs. If they happened to have the same PeerID, they will panic to restart.
func (*PeerMap) Notify ¶
func (s *PeerMap) Notify() <-chan multiplexer.Peer
Click to show internal directories.
Click to hide internal directories.