disabled

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNilTopicFloodPreventer

func NewNilTopicFloodPreventer() *nilTopicFloodPreventer

NewNilTopicFloodPreventer returns a new instance of nilTopicFloodPreventer

Types

type AntiFlood

type AntiFlood struct {
}

AntiFlood is a mock implementation of the antiflood interface

func (*AntiFlood) ApplyConsensusSize

func (af *AntiFlood) ApplyConsensusSize(_ int)

ApplyConsensusSize does nothing

func (*AntiFlood) BlacklistPeer

func (af *AntiFlood) BlacklistPeer(_ core.PeerID, _ string, _ time.Duration)

BlacklistPeer does nothing

func (*AntiFlood) CanProcessMessage

func (af *AntiFlood) CanProcessMessage(_ p2p.MessageP2P, _ core.PeerID) error

CanProcessMessage will always return nil

func (*AntiFlood) CanProcessMessagesOnTopic

func (af *AntiFlood) CanProcessMessagesOnTopic(_ core.PeerID, _ string, _ uint32, _ uint64, _ []byte) error

CanProcessMessagesOnTopic will always return nil

func (*AntiFlood) IsInterfaceNil

func (af *AntiFlood) IsInterfaceNil() bool

IsInterfaceNil return true if there is no value under the interface

func (*AntiFlood) IsOriginatorEligibleForTopic

func (af *AntiFlood) IsOriginatorEligibleForTopic(_ core.PeerID, _ string) error

IsOriginatorEligibleForTopic will always return nil

func (*AntiFlood) ResetForTopic

func (af *AntiFlood) ResetForTopic(_ string)

ResetForTopic won't do anything

func (*AntiFlood) SetDebugger

func (af *AntiFlood) SetDebugger(_ process.AntifloodDebugger) error

SetDebugger returns nil

func (*AntiFlood) SetMaxMessagesForTopic

func (af *AntiFlood) SetMaxMessagesForTopic(_ string, _ uint32)

SetMaxMessagesForTopic won't do anything

func (*AntiFlood) SetPeerValidatorMapper

func (af *AntiFlood) SetPeerValidatorMapper(_ process.PeerValidatorMapper) error

SetPeerValidatorMapper does nothing

func (*AntiFlood) SetTopicsForAll

func (af *AntiFlood) SetTopicsForAll(_ ...string)

SetTopicsForAll does nothing

type AntifloodDebugger

type AntifloodDebugger struct {
}

AntifloodDebugger is a disabled instance of the antoiflood debugger

func (*AntifloodDebugger) AddData

func (ad *AntifloodDebugger) AddData(_ core.PeerID, _ string, _ uint32, _ uint64, _ []byte, _ bool)

AddData does nothing

func (*AntifloodDebugger) Close

func (ad *AntifloodDebugger) Close() error

Close returns nil

func (*AntifloodDebugger) IsInterfaceNil

func (ad *AntifloodDebugger) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

type PeerBlacklistCacher

type PeerBlacklistCacher struct {
}

PeerBlacklistCacher is a mock implementation of PeerBlacklistHandler that does not manage black listed keys (all keys [peers] are whitelisted)

func (*PeerBlacklistCacher) Has

func (pbc *PeerBlacklistCacher) Has(_ core.PeerID) bool

Has outputs false (all peers are white listed)

func (*PeerBlacklistCacher) IsInterfaceNil

func (pbc *PeerBlacklistCacher) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*PeerBlacklistCacher) Sweep

func (pbc *PeerBlacklistCacher) Sweep()

Sweep does nothing

func (*PeerBlacklistCacher) Upsert

func (pbc *PeerBlacklistCacher) Upsert(_ core.PeerID, _ time.Duration) error

Upsert does nothing

type PeerValidatorMapper

type PeerValidatorMapper struct {
}

PeerValidatorMapper is a disabled validator mapper

func (*PeerValidatorMapper) GetPeerInfo

func (p *PeerValidatorMapper) GetPeerInfo(_ core.PeerID) core.P2PPeerInfo

GetPeerInfo returns validator type for all peers

func (*PeerValidatorMapper) IsInterfaceNil

func (p *PeerValidatorMapper) IsInterfaceNil() bool

IsInterfaceNil returns true if underlying object is nil

type TimeCache

type TimeCache struct {
}

TimeCache is a mock implementation of TimeCacher

func (*TimeCache) Add

func (tc *TimeCache) Add(_ string) error

Add does nothing

func (*TimeCache) Has

func (tc *TimeCache) Has(_ string) bool

Has outputs false (all keys are white listed)

func (*TimeCache) IsInterfaceNil

func (tc *TimeCache) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*TimeCache) Sweep

func (tc *TimeCache) Sweep()

Sweep does nothing

func (*TimeCache) Upsert

func (tc *TimeCache) Upsert(_ string, _ time.Duration) error

Upsert does nothing

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL