skynetblacklist

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 10 Imported by: 0

README

Skynet Blacklist

The Skynet Blacklist module manages a list of blacklisted Skylinks by tracking their merkleroots.

Subsystems

The following subsystems help the Skynet Blacklist module execute its responsibilities:

Skynet Blacklist Subsystem

Key Files

The Skynet Blacklist subsystem contains the structure of the Skynet Blacklist and is used to create a new Skynet Blacklist and return information about the Blacklist. Uses Persist package's Append-Only File subsystem to ensure ACID disk updates.

Exports

  • Blacklist returns the list of blacklisted merkle roots
  • IsBlacklisted returns whether or not a skylink merkleroot is blacklisted
  • New creates and returns a new Skynet Blacklist
  • UpdateBlacklist updates the blacklist

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SkynetBlacklist

type SkynetBlacklist struct {
	// contains filtered or unexported fields
}

SkynetBlacklist manages a set of blacklisted skylinks by tracking the merkleroots and persists the list to disk.

func New

func New(persistDir string) (*SkynetBlacklist, error)

New returns an initialized SkynetBlacklist.

func (*SkynetBlacklist) Blacklist

func (sb *SkynetBlacklist) Blacklist() []crypto.Hash

Blacklist returns the merkleroots that are blacklisted

func (*SkynetBlacklist) Close

func (sb *SkynetBlacklist) Close() error

Close closes and frees associated resources.

func (*SkynetBlacklist) IsBlacklisted

func (sb *SkynetBlacklist) IsBlacklisted(skylink modules.Skylink) bool

IsBlacklisted indicates if a skylink is currently blacklisted

func (*SkynetBlacklist) UpdateBlacklist

func (sb *SkynetBlacklist) UpdateBlacklist(additions, removals []modules.Skylink) error

UpdateBlacklist updates the list of skylinks that are blacklisted.

Jump to

Keyboard shortcuts

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