Documentation ¶
Index ¶
- type Engine
- func (e *Engine) Close() error
- func (e *Engine) Flush() error
- func (e *Engine) Get(m multihash.Multihash) ([]indexer.Value, bool, error)
- func (e *Engine) Iter() (indexer.Iterator, error)
- func (e *Engine) Put(value indexer.Value, mhs ...multihash.Multihash) error
- func (e *Engine) Remove(value indexer.Value, mhs ...multihash.Multihash) error
- func (e *Engine) RemoveProvider(ctx context.Context, providerID peer.ID) error
- func (e *Engine) RemoveProviderContext(providerID peer.ID, contextID []byte) error
- func (e *Engine) Size() (int64, error)
- func (e *Engine) Stats() (*indexer.Stats, error)
- type Option
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 ¶
New implements the indexer.Interface. It creates a new Engine with the given result cache and value store.
func (*Engine) RemoveProvider ¶
func (*Engine) RemoveProviderContext ¶
type Option ¶
type Option func(*config) error
func WithCacheOnPut ¶
WithCacheOnPut sets whether or not entries are cached on Put.
func WithDHBatchSize ¶
WithDHBatchSize configures the batch size when sending batches of merge requests to DHStore. A value < 1 results in the default size.
func WithDHStore ¶
WithDHStore sets the base URL for the dhstore service, and tells the core to send its values to the dhstore.
func WithHttpClientTimeout ¶ added in v0.7.1
WithHttpClientTimeout sets http timeout for queries to DHStore
func WithVSNoNewMH ¶
WithVSNoNewMH blocks putting new multihashes into the value store when set to true. New indexes will still be send to the DHStore service if one is configured.