ipns

package
v0.0.0-...-89def8d Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 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(store ds.TxnDatastore, ipfs iface.CoreAPI) (*Manager, error)

NewManager returns a new IPNS manager.

func (*Manager) Close

func (m *Manager) Close() error

Close 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.

func (*Manager) Store

func (m *Manager) Store() *s.Store

Store returns the key store.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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