reprovide

package
v0.4.21 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPinnedProvider

func NewPinnedProvider(onlyRoots bool) func(pinning pin.Pinner, dag ipld.DAGService) KeyChanFunc

NewPinnedProvider returns provider supplying pinned keys

Types

type KeyChanFunc

type KeyChanFunc func(context.Context) (<-chan cid.Cid, error)

KeyChanFunc is function streaming CIDs to pass to content routing

func NewBlockstoreProvider

func NewBlockstoreProvider(bstore blocks.Blockstore) KeyChanFunc

NewBlockstoreProvider returns key provider using bstore.AllKeysChan

type Reprovider

type Reprovider struct {
	// contains filtered or unexported fields
}

func NewReprovider

func NewReprovider(ctx context.Context, tick time.Duration, rsys routing.ContentRouting, keyProvider KeyChanFunc) *Reprovider

NewReprovider creates new Reprovider instance.

func (*Reprovider) Run

func (rp *Reprovider) Run(proc goprocess.Process)

Run re-provides keys with 'tick' interval or when triggered

func (*Reprovider) Trigger

func (rp *Reprovider) Trigger(ctx context.Context) error

Trigger starts reprovision process in rp.Run and waits for it

Jump to

Keyboard shortcuts

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