Documentation
¶
Overview ¶
Package watchtower continuously monitors the on-chain stake of all connected peers, and disconnects peers which fall below the minimum stake.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Guard ¶
type Guard struct {
// contains filtered or unexported fields
}
Guard contains the state necessary to make connection pruning decisions.
func NewGuard ¶
func NewGuard( ctx context.Context, duration time.Duration, stakeMonitor chain.StakeMonitor, connectionManager net.ConnectionManager, ) *Guard
NewGuard returns a new instance of Guard. Should only be called once per provider. Instantiating a new instance of Guard automatically runs it in the background for the lifetime of the client.
Click to show internal directories.
Click to hide internal directories.