Documentation
¶
Index ¶
Constants ¶
View Source
const ( PeerSourceUnknown = 0 PeerSourceTopologyLocalRoot = 1 PeerSourceTopologyPublicRoot = 2 PeerSourceTopologyBootstrapPeer = 3 PeerSourceP2PLedger = 4 PeerSourceP2PGossip = 5 PeerSourceInboundConn = 6 )
View Source
const (
OutboundConnectionEventType = "peergov.outbound-conn"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OutboundConnectionEvent ¶
type OutboundConnectionEvent struct {
ConnectionId ouroboros.ConnectionId
}
type Peer ¶
type Peer struct {
Address string
Source PeerSource
ConnectionId *ouroboros.ConnectionId
Sharable bool
ReconnectCount int
ReconnectDelay time.Duration
}
type PeerGovernor ¶
type PeerGovernor struct {
// contains filtered or unexported fields
}
func NewPeerGovernor ¶
func NewPeerGovernor(cfg PeerGovernorConfig) *PeerGovernor
func (*PeerGovernor) GetPeers ¶
func (p *PeerGovernor) GetPeers() []Peer
func (*PeerGovernor) LoadTopologyConfig ¶
func (p *PeerGovernor) LoadTopologyConfig( topologyConfig *topology.TopologyConfig, )
func (*PeerGovernor) Start ¶
func (p *PeerGovernor) Start() error
type PeerGovernorConfig ¶
type PeerGovernorConfig struct {
Logger *slog.Logger
EventBus *event.EventBus
ConnManager *connmanager.ConnectionManager
}
type PeerSource ¶
type PeerSource uint16
Click to show internal directories.
Click to hide internal directories.