Documentation ¶
Overview ¶
Package simple implements structures and methods to provide blocks, keep track of which blocks are provided, and to allow those blocks to be reprovided.
Index ¶
- Variables
- type KeyChanFuncdeprecated
- type Optiondeprecated
- func MaxWorkers(count int) Optiondeprecated
- func WithTimeout(timeout time.Duration) Optiondeprecated
- type Pinnerdeprecated
- type Providerdeprecated
- type Reproviderdeprecated
Constants ¶
This section is empty.
Variables ¶
var ErrClosed = errors.New("reprovider service stopped")
ErrClosed is returned by Trigger when operating on a closed reprovider.
Deprecated: use github.com/ipfs/boxo/provider/simple.ErrClosed
Functions ¶
This section is empty.
Types ¶
type KeyChanFunc
deprecated
KeyChanFunc is function streaming CIDs to pass to content routing
Deprecated: use github.com/ipfs/boxo/provider/simple.KeyChanFunc
func NewBlockstoreProvider
deprecated
func NewBlockstoreProvider(bstore blocks.Blockstore) KeyChanFunc
NewBlockstoreProvider returns key provider using bstore.AllKeysChan
Deprecated: use github.com/ipfs/boxo/provider/simple.NewBlockstoreProvider
func NewPinnedProvider
deprecated
func NewPinnedProvider(onlyRoots bool, pinning Pinner, fetchConfig fetcher.Factory) KeyChanFunc
NewPinnedProvider returns provider supplying pinned keys
Deprecated: use github.com/ipfs/boxo/provider/simple.NewPinnedProvider
type Option
deprecated
added in
v0.1.1
type Option func(*Provider)
Option defines the functional option type that can be used to configure provider instances
Deprecated: use github.com/ipfs/boxo/provider/simple.Option
func MaxWorkers
deprecated
added in
v0.1.1
func WithTimeout
deprecated
added in
v0.1.1
type Pinner
deprecated
type Provider
deprecated
type Provider struct {
// contains filtered or unexported fields
}
Provider announces blocks to the network
Deprecated: use github.com/ipfs/boxo/provider/simple.Provider
func NewProvider
deprecated
type Reprovider
deprecated
type Reprovider struct {
// contains filtered or unexported fields
}
Reprovider reannounces blocks to the network
Deprecated: use github.com/ipfs/boxo/provider/simple.Reprovider
func NewReprovider
deprecated
func NewReprovider(ctx context.Context, reprovideInterval time.Duration, rsys routing.ContentRouting, keyProvider KeyChanFunc) *Reprovider
NewReprovider creates new Reprovider instance.
Deprecated: use github.com/ipfs/boxo/provider/simple.NewReprovider
func (*Reprovider) Reprovide ¶
func (rp *Reprovider) Reprovide() error
Reprovide registers all keys given by rp.keyProvider to libp2p content routing
func (*Reprovider) Run ¶
func (rp *Reprovider) Run()
Run re-provides keys with 'tick' interval or when triggered