Documentation
¶
Index ¶
- type Store
- func (s *Store) AppendReflog(_ context.Context, name string, e store.ReflogEntry) error
- func (s *Store) CASRef(_ context.Context, name string, expected, next store.Hash) error
- func (s *Store) Close() error
- func (s *Store) DeleteRef(_ context.Context, name string, expected store.Hash) error
- func (s *Store) GetObject(_ context.Context, h store.Hash) (store.Object, error)
- func (s *Store) GetRef(_ context.Context, name string) (store.Hash, bool, error)
- func (s *Store) HasObject(_ context.Context, h store.Hash) (bool, error)
- func (s *Store) IterObjects(_ context.Context, fn func(store.Hash, store.Object) error) error
- func (s *Store) ListRefs(_ context.Context, prefix string) ([]store.RefEntry, error)
- func (s *Store) PutObject(_ context.Context, h store.Hash, o store.Object) error
- func (s *Store) ReadReflog(_ context.Context, name string) ([]store.ReflogEntry, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a BadgerDB-backed store.Storage.
func Open ¶
Open opens (or creates) a BadgerDB at the given directory path and returns a Store wrapping it. Call Close() when done.
func OpenReadOnly ¶
OpenReadOnly opens an existing BadgerDB at dir for read-only access. It does not acquire the directory lock, so multiple readers (and one concurrent writer) can coexist. Mutating methods on the returned Store will return an error from BadgerDB.
func (*Store) AppendReflog ¶
func (*Store) IterObjects ¶
func (*Store) ReadReflog ¶
Click to show internal directories.
Click to hide internal directories.