ipns

package
v2.6.20 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Manager handles bucket name publishing to IPNS.

func NewManager

func NewManager(
	keys *mdb.IPNSKeys,
	keyAPI iface.KeyAPI,
	nameAPI iface.NameAPI,
	republishConcurrency int,
	debug bool,
) (*Manager, error)

NewManager returns a new IPNS manager.

func (*Manager) Close added in v2.6.2

func (m *Manager) Close()

Close manager.

func (*Manager) CreateKey

func (m *Manager) CreateKey(ctx context.Context, dbID thread.ID, path path.Path) (keyID string, err error)

CreateKey generates and saves a new IPNS key.

func (*Manager) Publish

func (m *Manager) Publish(pth path.Path, keyID string)

Publish publishes a path to IPNS with key ID. Publishing can take up to a minute. Pending publishes are cancelled by consecutive calls with the same key ID, which results in only the most recent publish succeeding.

func (*Manager) RemoveKey

func (m *Manager) RemoveKey(ctx context.Context, keyID string) error

RemoveKey removes an IPNS key.

func (*Manager) StartRepublishing added in v2.6.2

func (m *Manager) StartRepublishing(schedule string) error

StartRepublishing initializes a key republishing cron

Jump to

Keyboard shortcuts

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