Documentation ¶
Index ¶
- type Policy
- func (p *Policy) Allow(peerID peer.ID) bool
- func (p *Policy) Allowed(peerID peer.ID) bool
- func (p *Policy) Block(peerID peer.ID) bool
- func (p *Policy) Copy(other *Policy)
- func (p *Policy) NoneAllowed() bool
- func (p *Policy) PublishAllowed(publisherID, providerID peer.ID) bool
- func (p *Policy) ToConfig() config.Policy
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
}
func (*Policy) Allow ¶ added in v0.2.0
Allow alters the policy to allow the specified peer. Returns true if the policy needed to be updated.
func (*Policy) Block ¶ added in v0.2.0
Block alters the policy to not allow the specified peer. Returns true if the policy needed to be updated.
func (*Policy) NoneAllowed ¶ added in v0.4.11
Return true if no peers are allowed.
func (*Policy) PublishAllowed ¶ added in v0.4.7
PublishAllowed returns true if policy allows the publisher to publish advertisements for the identified provider, and the provider is allowed.
Click to show internal directories.
Click to hide internal directories.