Documentation
¶
Overview ¶
Package pogrebstore implements the blob.KV interface using pogreb.
Index ¶
- func Opener(_ context.Context, addr string) (blob.KV, error)
- type KV
- func (s *KV) Close(_ context.Context) error
- func (s *KV) Delete(_ context.Context, key string) error
- func (s *KV) Get(_ context.Context, key string) ([]byte, error)
- func (s *KV) Len(ctx context.Context) (int64, error)
- func (s *KV) List(_ context.Context, start string, f func(string) error) error
- func (s *KV) Put(_ context.Context, opts blob.PutOptions) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Opener ¶
Opener constructs a filestore from an address comprising a URL, for use with the store package. The host and path identify the database directory. The following optional query parameters are understood:
sync : interval between automatic syncs (duration; default 10s) compact : interval between automatic compactions (duration; default 1m)
Types ¶
type KV ¶
type KV struct {
// contains filtered or unexported fields
}
KV implements the blob.KV interface using a pogreb database.
func (*KV) Close ¶
Close implements part of the blob.KV interface. It closes the underlying database instance and reports its result.
Click to show internal directories.
Click to hide internal directories.