reprovide

package
v0.0.0-...-7fe9760 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyChanFunc

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

keychanfunc是传递到内容路由的函数流式CID

func NewBlockstoreProvider

func NewBlockstoreProvider(bstore blocks.Blockstore) KeyChanFunc

NewblockStoreProvider使用bstore.allkeyschan返回密钥提供程序

func NewPinnedProvider

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

NewPinnedProvider返回提供固定密钥的提供程序

type Reprovider

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

func NewReprovider

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

NewReprovider创建新的Reprovider实例。

func (*Reprovider) Reprovide

func (rp *Reprovider) Reprovide() error

将rp.keyprovider提供的所有密钥重新提供给libp2p内容路由

func (*Reprovider) Run

func (rp *Reprovider) Run(tick time.Duration)

运行重新为键提供“勾号”间隔或在触发时

func (*Reprovider) Trigger

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

触发器在rp.run中启动重新设置进程并等待它

Jump to

Keyboard shortcuts

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