astore

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package astore contains implementations for different AStores used in Hoard

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type FlatPersistedAStore

type FlatPersistedAStore struct {
	// contains filtered or unexported fields
}

func (FlatPersistedAStore) Store

func (a FlatPersistedAStore) Store(file storage.AFile, reader io.Reader) error

type InMemoryAStore

type InMemoryAStore struct {
	// contains filtered or unexported fields
}

func NewInMemoryAStore

func NewInMemoryAStore() *InMemoryAStore

func (*InMemoryAStore) Delete

func (a *InMemoryAStore) Delete(file storage.AFile) error

func (*InMemoryAStore) Get

func (a *InMemoryAStore) Get(aFile storage.AFile) (io.ReadCloser, error)

func (*InMemoryAStore) Search

func (a *InMemoryAStore) Search(startOpt *hour.Hour, end hour.Hour) ([]storage.SearchResult, error)

func (*InMemoryAStore) Store

func (a *InMemoryAStore) Store(aFile storage.AFile, reader io.Reader) error

func (*InMemoryAStore) String

func (a *InMemoryAStore) String() string

type PersistedAStore

type PersistedAStore struct {
	// contains filtered or unexported fields
}

func (PersistedAStore) Delete

func (a PersistedAStore) Delete(file storage.AFile) error

func (PersistedAStore) Get

func (PersistedAStore) Search

func (a PersistedAStore) Search(startOpt *hour.Hour, end hour.Hour) ([]storage.SearchResult, error)

func (PersistedAStore) Store

func (a PersistedAStore) Store(aFile storage.AFile, reader io.Reader) error

func (PersistedAStore) String

func (a PersistedAStore) String() string

type ReplicatedAStore

type ReplicatedAStore struct {
	// contains filtered or unexported fields
}

TODO: write tests for this

func NewReplicatedAStore

func NewReplicatedAStore(aStores ...storage.AStore) ReplicatedAStore

func (ReplicatedAStore) Delete

func (m ReplicatedAStore) Delete(aFile storage.AFile) error

func (ReplicatedAStore) Get

func (m ReplicatedAStore) Get(aFile storage.AFile) (io.ReadCloser, error)

func (ReplicatedAStore) Replicas

func (m ReplicatedAStore) Replicas() []storage.AStore

func (ReplicatedAStore) Search

func (m ReplicatedAStore) Search(startOpt *hour.Hour, end hour.Hour) ([]storage.SearchResult, error)

func (ReplicatedAStore) Store

func (m ReplicatedAStore) Store(aFile storage.AFile, reader io.Reader) error

func (ReplicatedAStore) String

func (m ReplicatedAStore) String() string

Jump to

Keyboard shortcuts

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