storethehash

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: Apache-2.0, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SthStorage

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

func New

func New(ctx context.Context, dir string, putConcurrency int, options ...sth.Option) (*SthStorage, error)

New creates a new indexer.Interface implemented by a storethehash-based value store.

The given indexer.ValueCodec is used to serialize and deserialize values. If it is set to nil, indexer.BinaryWithJsonFallbackCodec is used which // will gracefully migrate the codec from JSON to Binary format.

func (*SthStorage) Close

func (s *SthStorage) Close() error

func (*SthStorage) Flush

func (s *SthStorage) Flush() error

func (*SthStorage) Get

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

func (*SthStorage) Iter

func (s *SthStorage) Iter() (indexer.Iterator, error)

func (*SthStorage) Put

func (s *SthStorage) Put(value indexer.Value, mhs ...multihash.Multihash) error

func (*SthStorage) Remove

func (s *SthStorage) Remove(value indexer.Value, mhs ...multihash.Multihash) error

func (*SthStorage) RemoveProvider

func (s *SthStorage) RemoveProvider(ctx context.Context, providerID peer.ID) error

func (*SthStorage) RemoveProviderContext

func (s *SthStorage) RemoveProviderContext(providerID peer.ID, contextID []byte) error

func (*SthStorage) SetFileCacheSize

func (s *SthStorage) SetFileCacheSize(size int)

func (*SthStorage) SetPutConcurrency

func (s *SthStorage) SetPutConcurrency(n int)

func (*SthStorage) Size

func (s *SthStorage) Size() (int64, error)

func (*SthStorage) Stats

func (s *SthStorage) Stats() (*indexer.Stats, error)

Jump to

Keyboard shortcuts

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