Documentation ¶
Overview ¶
Package peerutil provides utilities around peer ID values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Policy ¶
type Policy struct {
// contains filtered or unexported fields
}
Policy is a boolean value with a set of zero or more peer ID values. Evaluating a peer ID returns the boolean value, or its opposite if the peer ID is in the set of IDs.
This serves a basis for simple policies where the boolean value applies to all peers except those in the set of peer IDs.
func NewPolicy ¶
New creates a new Policy.
The Policy evaluates to the given boolean value for all peers, except those listed in the except list.
func (*Policy) ExceptStrings ¶
ExceptStrings returns the except list as a slice of peer.ID strings.
Click to show internal directories.
Click to hide internal directories.