storethehash

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: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SthStorage added in v0.6.1

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 added in v0.6.1

func (s *SthStorage) Close() error

func (*SthStorage) Flush added in v0.6.1

func (s *SthStorage) Flush() error

func (*SthStorage) Get added in v0.6.1

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

func (*SthStorage) Iter added in v0.6.1

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

func (*SthStorage) Put added in v0.6.1

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

func (*SthStorage) Remove added in v0.6.1

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

func (*SthStorage) RemoveProvider added in v0.6.1

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

func (*SthStorage) RemoveProviderContext added in v0.6.1

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

func (*SthStorage) SetFileCacheSize added in v0.6.2

func (s *SthStorage) SetFileCacheSize(size int)

func (*SthStorage) SetPutConcurrency added in v0.6.1

func (s *SthStorage) SetPutConcurrency(n int)

func (*SthStorage) Size added in v0.6.1

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

Jump to

Keyboard shortcuts

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