ipns

package
v2.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 14 Imported by: 0

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, debug bool) (*Manager, error)

NewManager returns a new IPNS manager.

func (*Manager) Cancel

func (m *Manager) Cancel()

Cancel all pending publishes.

func (*Manager) CreateKey

func (m *Manager) CreateKey(ctx context.Context, dbID thread.ID) (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.

Jump to

Keyboard shortcuts

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