Documentation ¶
Index ¶
- type SthStorage
- func (s *SthStorage) Close() error
- func (s *SthStorage) Flush() error
- func (s *SthStorage) Get(m multihash.Multihash) ([]indexer.Value, bool, error)
- func (s *SthStorage) Iter() (indexer.Iterator, error)
- func (s *SthStorage) Put(value indexer.Value, mhs ...multihash.Multihash) error
- func (s *SthStorage) Remove(value indexer.Value, mhs ...multihash.Multihash) error
- func (s *SthStorage) RemoveProvider(ctx context.Context, providerID peer.ID) error
- func (s *SthStorage) RemoveProviderContext(providerID peer.ID, contextID []byte) error
- func (s *SthStorage) SetFileCacheSize(size int)
- func (s *SthStorage) SetPutConcurrency(n int)
- func (s *SthStorage) Size() (int64, error)
- func (s *SthStorage) Stats() (*indexer.Stats, error)
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 (*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)
Click to show internal directories.
Click to hide internal directories.