greylist

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Filter is a discovery filter that greylists certain peers that are known to be down for the configured amount of time

func New

func New(expire time.Duration) *Filter

New creates a new greylist filter with the given expiry interval

func (*Filter) Accept

func (b *Filter) Accept(peer fab.Peer) bool

Accept returns whether or not to Accept a peer as a canditate for endorsement

func (*Filter) Greylist

func (b *Filter) Greylist(err error)

Greylist the given peer URL

Jump to

Keyboard shortcuts

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