Documentation ¶
Index ¶
- type Backend
- type FileBackend
- func (s *FileBackend) Flush(indexes map[string]types.NamedIndices) error
- func (s *FileBackend) FlushAccounts(accounts []string) error
- func (s *FileBackend) FlushTransactions(indexes map[string]*types.TrieIndex) error
- func (s *FileBackend) Read(account string) (types.NamedIndices, error)
- func (s *FileBackend) ReadAccounts() ([]string, error)
- func (s *FileBackend) ReadTransactions(prefix string) (*types.TrieIndex, error)
- type S3Backend
- func (s *S3Backend) Flush(indexes map[string]types.NamedIndices) error
- func (s *S3Backend) FlushAccounts(accounts []string) error
- func (s *S3Backend) FlushTransactions(indexes map[string]*types.TrieIndex) error
- func (s *S3Backend) Read(account string) (types.NamedIndices, error)
- func (s *S3Backend) ReadAccounts() ([]string, error)
- func (s *S3Backend) ReadTransactions(prefix string) (*types.TrieIndex, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Flush(map[string]types.NamedIndices) error FlushAccounts([]string) error Read(account string) (types.NamedIndices, error) ReadAccounts() ([]string, error) FlushTransactions(map[string]*types.TrieIndex) error ReadTransactions(prefix string) (*types.TrieIndex, error) }
TODO: Use a more standardized filesystem-style backend, so we can re-use code
type FileBackend ¶
type FileBackend struct {
// contains filtered or unexported fields
}
func NewFileBackend ¶
func NewFileBackend(dir string, parallel uint32) (*FileBackend, error)
NewFileBackend connects to indices stored at `dir`, creating the directory if one doesn't exist, and uses `parallel` to control how many workers to use when flushing to disk.
func (*FileBackend) Flush ¶
func (s *FileBackend) Flush(indexes map[string]types.NamedIndices) error
func (*FileBackend) FlushAccounts ¶
func (s *FileBackend) FlushAccounts(accounts []string) error
func (*FileBackend) FlushTransactions ¶
func (s *FileBackend) FlushTransactions(indexes map[string]*types.TrieIndex) error
func (*FileBackend) Read ¶
func (s *FileBackend) Read(account string) (types.NamedIndices, error)
func (*FileBackend) ReadAccounts ¶
func (s *FileBackend) ReadAccounts() ([]string, error)
func (*FileBackend) ReadTransactions ¶
func (s *FileBackend) ReadTransactions(prefix string) (*types.TrieIndex, error)
type S3Backend ¶
type S3Backend struct {
// contains filtered or unexported fields
}
func NewS3Backend ¶
func (*S3Backend) FlushAccounts ¶
func (*S3Backend) FlushTransactions ¶
func (*S3Backend) ReadAccounts ¶
Click to show internal directories.
Click to hide internal directories.