yatsdb

package module
v0.4.0 Latest Latest
Warning

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

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

README

yatsdb

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JS

func JS(obj interface{}) string

func WriteConfig added in v0.2.0

func WriteConfig(opts Options, filepath string) error

Types

type InvertedIndexUpdater

type InvertedIndexUpdater interface {
	//set labels to streamID indexß
	Insert(streamMetric invertedindex.StreamMetric) error
}

type MetricSampleIteratorCreater

type MetricSampleIteratorCreater interface {
	CreateSampleSampleIterator(StreamMetric *StreamMetricOffset) (SampleIterator, error)
}

type MetricsQuerier

type MetricsQuerier interface {
	Query(matchers *[]prompb.LabelMatcher) (*[]model.Metric, error)
}

type OffsetIndexUpdater

type OffsetIndexUpdater = ssoffsetindex.OffsetIndexUpdater

type Options

type Options struct {
	BadgerDBStoreDir       string                                 `yaml:"badger_db_store_dir"`
	EnableStreamStore      bool                                   `yaml:"enable_stream_store"`
	EnableTBOffsetIndex    bool                                   `yaml:"enable_tb_offset_index"`
	ReadGorutines          int                                    `yaml:"read_gorutines"`
	StreamStoreOptions     streamstore.Options                    `yaml:"stream_store_options"`
	FileStreamStoreOptions filestreamstore.FileStreamStoreOptions `yaml:"file_stream_store_options"`
	OffsetIndexOptions     tboffsetindex.Options                  `yaml:"offset_index_options"`
	Debug                  struct {
		DumpReadRequestResponse bool `yaml:"dump_read_request_response"`
		LogWriteStat            bool `yaml:"log_write_stat"`
	} `yaml:"debug"`

	Registerer prometheus.Registerer `yaml:"-"`
}

func DefaultOptions

func DefaultOptions(path string) Options

DefaultOptions return default options with store path

func ParseConfig added in v0.2.0

func ParseConfig(filepath string) (Options, error)

ParseConfig parse config from file

type SampleIterator

type SampleIterator interface {
	//io.EOF end of stream
	Next() (prompb.Sample, error)
	Close() error
}

stream reader

type SamplesWriter

type SamplesWriter interface {
	Write(ID StreamID, samples []prompb.Sample, fn WriteSampleCallback)
}

type SeriesStreamOffset

type SeriesStreamOffset = ssoffsetindex.SeriesStreamOffset

type StreamID

type StreamID = invertedindex.StreamID

type StreamMetricOffset

type StreamMetricOffset struct {
	invertedindex.StreamMetric

	Offset int64
	//
	StartTimestampMs int64
	//
	EndTimestampMs int64
}

type StreamMetricQuerier

type StreamMetricQuerier interface {
	QueryStreamMetric(*prompb.Query) ([]*StreamMetricOffset, error)
}

type TSDB

type TSDB interface {
	WriteSamples(*prompb.WriteRequest) error
	ReadSamples(ctx context.Context, request *prompb.ReadRequest) (*prompb.ReadResponse, error)
}

func OpenTSDB

func OpenTSDB(options Options) (TSDB, error)

type WriteSampleCallback

type WriteSampleCallback func(offset SeriesStreamOffset, err error)

Jump to

Keyboard shortcuts

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