Documentation ¶
Index ¶
- type SkynetBlocklist
- func (sb *SkynetBlocklist) Blocklist() []crypto.Hash
- func (sb *SkynetBlocklist) Close() error
- func (sb *SkynetBlocklist) IsBlocked(skylink modules.Skylink) bool
- func (sb *SkynetBlocklist) IsHashBlocked(hash crypto.Hash) bool
- func (sb *SkynetBlocklist) UpdateBlocklist(additions, removals []crypto.Hash) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SkynetBlocklist ¶
type SkynetBlocklist struct {
// contains filtered or unexported fields
}
SkynetBlocklist manages a set of blocked skylinks by tracking the merkleroots and persists the list to disk.
func New ¶
func New(persistDir string) (*SkynetBlocklist, error)
New returns an initialized SkynetBlocklist.
func (*SkynetBlocklist) Blocklist ¶
func (sb *SkynetBlocklist) Blocklist() []crypto.Hash
Blocklist returns the hashes of the merkleroots that are blocked
func (*SkynetBlocklist) Close ¶
func (sb *SkynetBlocklist) Close() error
Close closes and frees associated resources.
func (*SkynetBlocklist) IsBlocked ¶
func (sb *SkynetBlocklist) IsBlocked(skylink modules.Skylink) bool
IsBlocked indicates if a skylink is currently blocked
func (*SkynetBlocklist) IsHashBlocked ¶ added in v1.5.4
func (sb *SkynetBlocklist) IsHashBlocked(hash crypto.Hash) bool
IsHashBlocked indicates if a hash is currently blocked
func (*SkynetBlocklist) UpdateBlocklist ¶
func (sb *SkynetBlocklist) UpdateBlocklist(additions, removals []crypto.Hash) error
UpdateBlocklist updates the list of skylinks that are blocked.
Click to show internal directories.
Click to hide internal directories.