Back to / pkg / client / common / discovery / greylist

package greylist

v1.0.0 (01fc6e2)
Latest Go to latest
Published: Jul 6, 2020 | License: Apache-2.0 | Module:


Package Files

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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier