replication

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 11 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 {
	// contains filtered or unexported fields
}

func New

func New(
	ctx context.Context,
	cancel context.CancelFunc,
	repo repo.Repo,
	h host.Host,
	dagSyncer crdt.DAGSyncer,
	st datastore.Batching,
	prefix string,
	topic string,
	broadcastInterval time.Duration,
	syncer Syncer,
) (*Manager, error)

func (*Manager) Close

func (m *Manager) Close() error

func (*Manager) FindTag

func (m *Manager) FindTag(tag string) (cid.Cid, error)

func (*Manager) Get

func (m *Manager) Get(key datastore.Key) ([]byte, error)

func (*Manager) GetAllCids

func (m *Manager) GetAllCids() ([]cid.Cid, error)

func (*Manager) GetAllTags

func (m *Manager) GetAllTags() ([]string, error)

func (*Manager) Has

func (m *Manager) Has(key datastore.Key) (bool, error)

func (*Manager) Put

func (m *Manager) Put(key datastore.Key, v []byte) error

func (*Manager) StartContentWatcher

func (m *Manager) StartContentWatcher()

func (*Manager) Tag

func (m *Manager) Tag(tag string, id cid.Cid) error

type Syncer

type Syncer interface {
	GetFile(context.Context, cid.Cid) (ufsio.ReadSeekCloser, error)
}

Jump to

Keyboard shortcuts

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