Documentation ¶
Overview ¶
Package dstore contains implementations for different DStores used in Hoard
Index ¶
- func NewFlatPersistedDStore(b persistence.PersistedStorage) storage.WritableDStore
- func NewPersistedDStore(b persistence.PersistedStorage, log logrus.FieldLogger) storage.DStore
- type FlatPersistedDStore
- type InMemoryDStore
- func (dstore *InMemoryDStore) Count() int
- func (dstore *InMemoryDStore) Delete(storage.DFile) error
- func (dstore *InMemoryDStore) Get(dFile storage.DFile) (io.ReadCloser, error)
- func (dstore *InMemoryDStore) ListInHour(hr hour.Hour) ([]storage.DFile, error)
- func (dstore *InMemoryDStore) ListNonEmptyHours() ([]hour.Hour, error)
- func (dstore *InMemoryDStore) Store(file storage.DFile, content io.Reader) error
- type PersistedDStore
- func (d PersistedDStore) Delete(file storage.DFile) error
- func (d PersistedDStore) Get(file storage.DFile) (io.ReadCloser, error)
- func (d PersistedDStore) ListInHour(hour hour.Hour) ([]storage.DFile, error)
- func (d PersistedDStore) ListNonEmptyHours() ([]hour.Hour, error)
- func (d PersistedDStore) Store(file storage.DFile, content io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFlatPersistedDStore ¶
func NewFlatPersistedDStore(b persistence.PersistedStorage) storage.WritableDStore
func NewPersistedDStore ¶
func NewPersistedDStore(b persistence.PersistedStorage, log logrus.FieldLogger) storage.DStore
Types ¶
type FlatPersistedDStore ¶
type FlatPersistedDStore struct {
// contains filtered or unexported fields
}
type InMemoryDStore ¶
type InMemoryDStore struct {
// contains filtered or unexported fields
}
func NewInMemoryDStore ¶
func NewInMemoryDStore() *InMemoryDStore
func (*InMemoryDStore) Count ¶
func (dstore *InMemoryDStore) Count() int
func (*InMemoryDStore) Get ¶
func (dstore *InMemoryDStore) Get(dFile storage.DFile) (io.ReadCloser, error)
func (*InMemoryDStore) ListInHour ¶
func (*InMemoryDStore) ListNonEmptyHours ¶
func (dstore *InMemoryDStore) ListNonEmptyHours() ([]hour.Hour, error)
type PersistedDStore ¶
type PersistedDStore struct {
// contains filtered or unexported fields
}
func (PersistedDStore) Get ¶
func (d PersistedDStore) Get(file storage.DFile) (io.ReadCloser, error)
func (PersistedDStore) ListInHour ¶
func (PersistedDStore) ListNonEmptyHours ¶
func (d PersistedDStore) ListNonEmptyHours() ([]hour.Hour, error)
Click to show internal directories.
Click to hide internal directories.