batched

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: Apache-2.0, MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchProvidingSystem

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

func New

func New(provider provideMany, q *queue.Queue, opts ...Option) (*BatchProvidingSystem, error)

func (*BatchProvidingSystem) Close

func (s *BatchProvidingSystem) Close() error

func (*BatchProvidingSystem) Provide

func (s *BatchProvidingSystem) Provide(cid cid.Cid) error

func (*BatchProvidingSystem) Reprovide

func (s *BatchProvidingSystem) Reprovide(ctx context.Context) error

func (*BatchProvidingSystem) Run

func (s *BatchProvidingSystem) Run()

func (*BatchProvidingSystem) Stat

Stat returns various stats about this provider system

type BatchedProviderStats

type BatchedProviderStats struct {
	TotalProvides, LastReprovideBatchSize     int
	AvgProvideDuration, LastReprovideDuration time.Duration
}

type Option

type Option func(system *BatchProvidingSystem) error

Option defines the functional option type that can be used to configure BatchProvidingSystem instances

func Datastore

func Datastore(batching datastore.Batching) Option

func KeyProvider

func KeyProvider(fn simple.KeyChanFunc) Option

func ReproviderInterval

func ReproviderInterval(duration time.Duration) Option

Jump to

Keyboard shortcuts

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