storage

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAlreadyClosed = errors.New("the db is already closed")
View Source
var ErrClosing = errors.New("the db is in closing state")
View Source
var OutOfSpaceThreshold = 512 * bytesize.MB

Functions

func FromTreeToMainKey

func FromTreeToMainKey(k string) string

Types

type DeleteInput added in v0.0.33

type DeleteInput struct {
	Key *Key
}

type GetInput added in v0.0.30

type GetInput struct {
	StartTime time.Time
	EndTime   time.Time
	Key       *Key
}

type GetOutput added in v0.0.30

type GetOutput struct {
	Tree       *tree.Tree
	Timeline   *segment.Timeline
	SpyName    string
	SampleRate uint32
	Units      string
}

type Key

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

func ParseKey

func ParseKey(name string) (*Key, error)

TODO: should rewrite this at some point to not rely on regular expressions & splits

func (*Key) AppName added in v0.0.13

func (k *Key) AppName() string

func (*Key) DictKey

func (k *Key) DictKey() string

func (*Key) Hashed

func (k *Key) Hashed() []byte

func (*Key) Normalized

func (k *Key) Normalized() string

func (*Key) SegmentKey

func (k *Key) SegmentKey() string

func (*Key) TreeKey

func (k *Key) TreeKey(depth int, t time.Time) string

type ParserState

type ParserState int

type PutInput added in v0.0.30

type PutInput struct {
	StartTime       time.Time
	EndTime         time.Time
	Key             *Key
	Val             *tree.Tree
	SpyName         string
	SampleRate      uint32
	Units           string
	AggregationType string
}

type Storage

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

func New

func New(cfg *config.Server) (*Storage, error)

func (*Storage) CacheStats added in v0.0.33

func (s *Storage) CacheStats() map[string]interface{}

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) CollectLocalProfiles added in v0.0.33

func (s *Storage) CollectLocalProfiles() error

func (*Storage) Delete added in v0.0.33

func (s *Storage) Delete(di *DeleteInput) error

func (*Storage) DeleteDataBefore added in v0.0.33

func (s *Storage) DeleteDataBefore(threshold time.Time) error

func (*Storage) DiskUsage

func (s *Storage) DiskUsage() map[string]bytesize.ByteSize

func (*Storage) Get

func (s *Storage) Get(gi *GetInput) (*GetOutput, error)

func (*Storage) GetKeys

func (s *Storage) GetKeys(cb func(_k string) bool)

func (*Storage) GetValues

func (s *Storage) GetValues(key string, cb func(v string) bool)

func (*Storage) InstallID

func (s *Storage) InstallID() string

func (*Storage) IsClosing added in v0.0.33

func (s *Storage) IsClosing() bool

func (*Storage) Put

func (s *Storage) Put(po *PutInput) error

func (*Storage) PutLocal added in v0.0.33

func (s *Storage) PutLocal(po *PutInput) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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