Documentation ¶
Index ¶
- type DownloaderTask
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) Delete(key datastore.Key) error
- func (m *Manager) DownloadManagerStatus() (res map[string]taskmanager.TaskStatus)
- func (m *Manager) FindTag(tag string) (*Metatag, error)
- func (m *Manager) Get(key datastore.Key) ([]byte, error)
- func (m *Manager) GetAllCids() ([]cid.Cid, error)
- func (m *Manager) GetAllTags() ([]string, error)
- func (m *Manager) Has(key datastore.Key) (bool, error)
- func (m *Manager) Index() (map[string]*Metatag, error)
- func (m *Manager) Put(key datastore.Key, v []byte) error
- func (m *Manager) StartContentWatcher()
- func (m *Manager) StartUnfinishedDownload(pid peer.ID)
- func (m *Manager) Tag(tag string, meta *Metatag) error
- type Metatag
- type Syncer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloaderTask ¶ added in v0.0.12
type DownloaderTask struct {
// contains filtered or unexported fields
}
func (*DownloaderTask) Execute ¶ added in v0.0.12
func (d *DownloaderTask) Execute(ctx context.Context) error
func (*DownloaderTask) Name ¶ added in v0.0.12
func (d *DownloaderTask) Name() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles replication
func New ¶
func New( ctx context.Context, cancel context.CancelFunc, r repo.Repo, h host.Host, dagSyncer crdt.DAGSyncer, st datastore.Batching, prefix string, topic string, broadcastInterval time.Duration, syncer Syncer, ) (*Manager, error)
New creates a new replication manager
func (*Manager) DownloadManagerStatus ¶ added in v0.0.12
func (m *Manager) DownloadManagerStatus() (res map[string]taskmanager.TaskStatus)
DownloadManagerStatus returns taskmanager status for handling downloads
func (*Manager) Get ¶
Get retrieves the object `value` named by `key`. Get will return ErrNotFound if the key is not mapped to a value.
func (*Manager) GetAllCids ¶
GetAllCids returns all the cids in the crdt store
func (*Manager) GetAllTags ¶
GetAllTags returns all tags
func (*Manager) Has ¶
Has returns whether the `key` is mapped to a `value`. In some contexts, it may be much cheaper only to check for existence of a value, rather than retrieving the value itself. (e.g. HTTP HEAD). The default implementation is found in `GetBackedHas`.
func (*Manager) StartContentWatcher ¶
func (m *Manager) StartContentWatcher()
StartContentWatcher watches on incoming contents and gets content in datastore
func (*Manager) StartUnfinishedDownload ¶ added in v0.0.12
StartUnfinishedDownload starts unfinished downloads once peer comes back