filter

package
v0.0.0-...-523a819 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SelectAllPolicy = func(discovery.NetworkMember) bool {
	return true
}

selectallpolicy选择给定的所有成员

View Source
var SelectNonePolicy = func(discovery.NetworkMember) bool {
	return false
}

SelectNonePolicy selects an empty set of members

Functions

func AnyMatch

func AnyMatch(peerPool []discovery.NetworkMember, filters ...RoutingFilter) []discovery.NetworkMember

any match筛选出与任何给定筛选器都不匹配的对等方

func First

func First(peerPool []discovery.NetworkMember, filter RoutingFilter) *comm.RemotePeer

first返回与给定筛选器匹配的第一个对等机

func SelectPeers

func SelectPeers(k int, peerPool []discovery.NetworkMember, filter RoutingFilter) []*comm.RemotePeer

selectpeers返回一个与路由筛选器匹配的对等片

Types

type RoutingFilter

type RoutingFilter func(discovery.NetworkMember) bool

routingfilter定义网络成员上的谓词 它用于断言给定的networkmember是否应 为获得消息而选择

func CombineRoutingFilters

func CombineRoutingFilters(filters ...RoutingFilter) RoutingFilter

combineroutingfilters返回给定路由筛选器的逻辑与

Jump to

Keyboard shortcuts

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