skynetportals

package
v1.5.4-rc2 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 10 Imported by: 2

README

Skynet Portals

The Skynet Portals module manages a list of known Skynet portals and whether they are public or not.

Subsystems

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

Skynet Portals Subsystem

Key Files

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

Exports

  • Portals returns the list of known Skynet portals and whether they are public
  • New creates and returns a new Skynet Portals List
  • UpdatePortals updates the Portals List

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrSkynetPortalsValidation is the error returned when validation of
	// changes to the Skynet portals list fails.
	ErrSkynetPortalsValidation = errors.New("could not validate additions and removals")
)

Functions

This section is empty.

Types

type SkynetPortals

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

SkynetPortals manages a list of known Skynet portals by persisting the list to disk.

func New

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

New returns an initialized SkynetPortals.

func (*SkynetPortals) Close added in v1.4.9

func (sp *SkynetPortals) Close() error

Close closes and frees associated resources.

func (*SkynetPortals) Portals

func (sp *SkynetPortals) Portals() []modules.SkynetPortal

Portals returns the list of known Skynet portals.

func (*SkynetPortals) UpdatePortals added in v1.4.9

func (sp *SkynetPortals) UpdatePortals(additions []modules.SkynetPortal, removals []modules.NetAddress) error

UpdatePortals updates the list of known Skynet portals.

Jump to

Keyboard shortcuts

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