reframe

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0, MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryWithBackoff

func RetryWithBackoff(f func() error, initialInterval time.Duration, times int) error

Types

type ReframeListener

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

func New

func New(ctx context.Context, engine provider.Interface,
	cidTtl time.Duration,
	chunkSize int,
	snapshotSize int,
	providerId string,
	addresses []string,
	ds datastore.Datastore,
	nonceGen func() []byte) (*ReframeListener, error)

NewReframeListenerWithNonceGen creates a reframe listener and initialises its state from the provided datastore.

func (*ReframeListener) FindProviders

func (listener *ReframeListener) FindProviders(ctx context.Context, key cid.Cid) (<-chan client.FindProvidersAsyncResult, error)

func (*ReframeListener) GetIPNS

func (listener *ReframeListener) GetIPNS(ctx context.Context, id []byte) (<-chan client.GetIPNSAsyncResult, error)

func (*ReframeListener) Provide

func (listener *ReframeListener) Provide(ctx context.Context, pr *client.ProvideRequest) (<-chan client.ProvideAsyncResult, error)

func (*ReframeListener) PutIPNS

func (listener *ReframeListener) PutIPNS(ctx context.Context, id []byte, record []byte) (<-chan client.PutIPNSAsyncResult, error)

func (*ReframeListener) Shutdown

func (listener *ReframeListener) Shutdown()

type ReframeMultihashLister

type ReframeMultihashLister struct {
	CidFetcher func(contextID []byte) (map[cid.Cid]struct{}, error)
}

func (*ReframeMultihashLister) MultihashLister

func (lister *ReframeMultihashLister) MultihashLister(ctx context.Context, p peer.ID, contextID []byte) (provider.MultihashIterator, error)

Jump to

Keyboard shortcuts

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