storage

package
v0.0.31 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromTreeToMainKey

func FromTreeToMainKey(k string) string

Types

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 int
	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      int
	Units           string
	AggregationType string
}

type Storage

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

func New

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

func (*Storage) Close

func (s *Storage) Close() 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) Put

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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