Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DHTPeerProtectionPatcher ¶
type DHTPeerProtectionPatcher struct {
// Max number of peers to protect
// non-positive means unlimited
// default is 0
MaxProtected int
// Target percentage of protected peers, (0.0,1.0]
// default is 0.5
ProtectionRate float32
// contains filtered or unexported fields
}
func (*DHTPeerProtectionPatcher) Heartbeat ¶
func (p *DHTPeerProtectionPatcher) Heartbeat(peerId peer.ID) bool
Notify the patcher with a validated / known trusted peer id so that it will be prefered in the protected peer selection algorithm
func (*DHTPeerProtectionPatcher) Patch ¶
func (p *DHTPeerProtectionPatcher) Patch(dht *kaddht.IpfsDHT)
Patches the peer protection algorithm of the given dht instance
Click to show internal directories.
Click to hide internal directories.