Documentation ¶
Overview ¶
Package storage wraps two bit casks as the disk-backed key-value store for sample information and run information
Index ¶
- type Storage
- func (storage *Storage) AddRun(run *records.Run) error
- func (storage *Storage) AddSample(sample *records.Sample) error
- func (storage *Storage) CloseStorage() error
- func (storage *Storage) DeleteRun(runName string) error
- func (storage *Storage) DeleteSample(sampleLabel string) error
- func (storage *Storage) GetNumRuns() int
- func (storage *Storage) GetNumSamples() int
- func (storage *Storage) GetRun(runName string) (*records.Run, error)
- func (storage *Storage) GetRunLabels() chan []byte
- func (storage *Storage) GetSample(sampleLabel string) (*records.Sample, error)
- func (storage *Storage) GetSampleJSONDump(sampleLabel string) (string, error)
- func (storage *Storage) GetSampleLabels() chan []byte
- func (storage *Storage) GetSampleProtoDump(sampleLabel string) (string, error)
- func (storage *Storage) Wipe() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage holds a bitcask db and some extra stuff
func OpenStorage ¶
OpenStorage will create/open up the databases and return a storage struct or an error
func (*Storage) CloseStorage ¶
CloseStorage will flush and close the storage databases
func (*Storage) DeleteSample ¶
DeleteSample is a method to remove a sample from storage
func (*Storage) GetNumRuns ¶
GetNumRuns returns the current number of runs in storage
func (*Storage) GetNumSamples ¶
GetNumSamples returns the current number of samples in storage
func (*Storage) GetRun ¶
GetRun is a method to retrieve an run from storage and unmarshal it to a struct
func (*Storage) GetRunLabels ¶
GetRunLabels returns a channel of run names (keys) held in storage
func (*Storage) GetSample ¶
GetSample is a method to retrieve a sample from storage and unmarshal it to a struct
func (*Storage) GetSampleJSONDump ¶
GetSampleJSONDump is a method to retrieve a sample from storage and return a string dump of the protobuf message in JSON
func (*Storage) GetSampleLabels ¶
GetSampleLabels returns a channel of sample labels (keys) held in storage
func (*Storage) GetSampleProtoDump ¶
GetSampleProtoDump is a method to retrieve a sample from storage and return a string dump of the protobuf message