Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FaultinessDetails ¶
type FaultinessDetails struct { Reason string `json:"reason"` Info map[string]interface{} `json:"info"` }
FaultinessDetails contains information about why the peers is considered faulty.
type Firewall ¶
type Firewall struct {
// contains filtered or unexported fields
}
Firewall is a object responsible for taking actions on faulty peers.
func NewFirewall ¶
func NewFirewall(p2pManager *p2p.Manager, autopeering *selection.Protocol, log *logger.Logger) (*Firewall, error)
NewFirewall create a new instance of Firewall object.
func (*Firewall) GetPeerFaultinessCount ¶
GetPeerFaultinessCount returns number of times the peer has been considered faulty.
func (*Firewall) HandleFaultyPeer ¶
func (f *Firewall) HandleFaultyPeer(peerID identity.ID, details *FaultinessDetails)
HandleFaultyPeer handles a faulty peer and takes appropriate actions.
Click to show internal directories.
Click to hide internal directories.