Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFlushRecord ¶
func DecodeFlushRecord(payload []byte) (*backend.FlushRecord, error)
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
func EncodeFlushRecord ¶
func EncodeFlushRecord(fr backend.FlushRecord) ([]byte, error)
Types ¶
type FileSystem ¶
FileSystem is a naive implementation of a backend. It uses rounded timestamps as an index directory which then contains a leveldb with the content. There is also a global leveldb that provides a reverse index.
func New ¶
func New(root, cert, host string, enableCollections bool, passphrase []byte) (*FileSystem, error)
New creates a new backend instance. The caller should issue a Close once the FileSystem backend is no longer needed.
func (*FileSystem) Close ¶
func (fs *FileSystem) Close()
Close is a required interface function. In our case we close the global database.
Close satisfies the backend interface.
func (*FileSystem) Get ¶
Get returns a GetResult for each provided digest.
Get satisfies the backend interface.
func (*FileSystem) GetTimestamps ¶
func (fs *FileSystem) GetTimestamps(timestamps []int64) ([]backend.TimestampResult, error)
GetTimestamps is a required interface function. In our case it retrieves the digests for a given timestamp.
GetTimestamps satisfies the backend interface.