Documentation ¶
Index ¶
- type FileSystem
- func (f *FileSystem) Block(hash []byte) (*bcgo.Block, error)
- func (f *FileSystem) BlockContainingRecord(channel string, hash []byte) (*bcgo.Block, error)
- func (f *FileSystem) BlockEntries(channel string, timestamp uint64) ([]*bcgo.BlockEntry, error)
- func (f *FileSystem) Head(channel string) (*bcgo.Reference, error)
- func (f *FileSystem) MeasureStorageUsage(prefix string) (map[string]uint64, error)
- func (f *FileSystem) PutBlock(hash []byte, block *bcgo.Block) error
- func (f *FileSystem) PutBlockEntry(channel string, entry *bcgo.BlockEntry) error
- func (f *FileSystem) PutHead(channel string, reference *bcgo.Reference) error
- type Memory
- func (m *Memory) Block(hash []byte) (*bcgo.Block, error)
- func (m *Memory) BlockContainingRecord(channel string, hash []byte) (*bcgo.Block, error)
- func (m *Memory) BlockEntries(channel string, timestamp uint64) ([]*bcgo.BlockEntry, error)
- func (m *Memory) Head(channel string) (*bcgo.Reference, error)
- func (m *Memory) PutBlock(hash []byte, block *bcgo.Block) error
- func (m *Memory) PutBlockEntry(channel string, entry *bcgo.BlockEntry) error
- func (m *Memory) PutHead(channel string, reference *bcgo.Reference) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶
type FileSystem struct {
Directory string
}
func NewFileSystem ¶
func NewFileSystem(directory string) (*FileSystem, error)
func (*FileSystem) BlockContainingRecord ¶
func (*FileSystem) BlockEntries ¶
func (f *FileSystem) BlockEntries(channel string, timestamp uint64) ([]*bcgo.BlockEntry, error)
func (*FileSystem) MeasureStorageUsage ¶
func (f *FileSystem) MeasureStorageUsage(prefix string) (map[string]uint64, error)
func (*FileSystem) PutBlockEntry ¶
func (f *FileSystem) PutBlockEntry(channel string, entry *bcgo.BlockEntry) error
type Memory ¶
type Memory struct { Blocks map[string]*bcgo.Block Heads map[string]*bcgo.Reference Entries map[string][]*bcgo.BlockEntry Mapping map[string]*bcgo.Block }
func (*Memory) BlockContainingRecord ¶
func (*Memory) BlockEntries ¶
func (*Memory) PutBlockEntry ¶
func (m *Memory) PutBlockEntry(channel string, entry *bcgo.BlockEntry) error
Click to show internal directories.
Click to hide internal directories.