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: 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,
	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