engine

package
v0.6.19 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine is an implementation of indexer.Interface that combines a result cache and a value store.

func New

func New(resultCache cache.Interface, valueStore indexer.Interface, options ...Option) *Engine

New implements the indexer.Interface. It creates a new Engine with the given result cache and value store.

func (*Engine) Close

func (e *Engine) Close() error

func (*Engine) Flush

func (e *Engine) Flush() error

func (*Engine) Get

func (e *Engine) Get(m multihash.Multihash) ([]indexer.Value, bool, error)

func (*Engine) Iter

func (e *Engine) Iter() (indexer.Iterator, error)

func (*Engine) Put

func (e *Engine) Put(value indexer.Value, mhs ...multihash.Multihash) error

func (*Engine) Remove

func (e *Engine) Remove(value indexer.Value, mhs ...multihash.Multihash) error

func (*Engine) RemoveProvider

func (e *Engine) RemoveProvider(ctx context.Context, providerID peer.ID) error

func (*Engine) RemoveProviderContext

func (e *Engine) RemoveProviderContext(providerID peer.ID, contextID []byte) error

func (*Engine) Size

func (e *Engine) Size() (int64, error)

type Option

type Option func(*config) error

func CacheOnPut

func CacheOnPut(on bool) Option

CacheOnPut sets whether or not entries are cached on Put.

Jump to

Keyboard shortcuts

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