Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithPeerFilter ¶
func WithPeerFilter(value PeerFilter) copts.Opt
WithPeerFilter sets a peer filter which provides per-request filtering of peers
func WithPrioritySelector ¶
func WithPrioritySelector(value PrioritySelector) copts.Opt
WithPrioritySelector sets a priority selector function which provides per-request prioritization of peers
Types ¶
type Params ¶
type Params struct { PeerFilter PeerFilter PrioritySelector PrioritySelector }
Params defines the parameters of a selection service request
func (*Params) SetPeerFilter ¶
func (p *Params) SetPeerFilter(value PeerFilter)
SetPeerFilter sets the peer filter
func (*Params) SetPrioritySelector ¶
func (p *Params) SetPrioritySelector(value PrioritySelector)
SetPrioritySelector sets the priority selector
type PrioritySelector ¶
PrioritySelector determines how likely a peer is to be selected over another peer. A positive return value means peer1 is selected; negative return value means the peer2 is selected; zero return value means their priorities are the same
Click to show internal directories.
Click to hide internal directories.