indexer

package
v2.6.13 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Indexer

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

Indexer creates a miner's index with Filecoin and Textile data.

func New

func New(pow *pow.Client, sub <-chan struct{}, powAdminToken string, store *store.Store, opts ...Option) (*Indexer, error)

New returns a new Indexer.

func (*Indexer) Close

func (i *Indexer) Close() error

Close closes an Indexer.

type Option

type Option func(*config)

Option allows to configure an indexer.

func WithFrequency

func WithFrequency(freq time.Duration) Option

WithFrequency indicates the frequency for the indexer daemon.

func WithRunOnStart

func WithRunOnStart(enabled bool) Option

WithRunOnStart indicates if the index must be generated when the deamon is started.

func WithSnapshotMaxAge

func WithSnapshotMaxAge(age time.Duration) Option

WithSnapshotMaxAge indicates the max-age of a snapshot, indicating that a new one should be generated.

Jump to

Keyboard shortcuts

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