rrdtool

package
v0.0.0-...-b6b44b4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ITEM_TO_SEND    = 1
	ITEM_TO_PULLRRD = 2
)
View Source
const (
	IO_TASK_M_READ
	IO_TASK_M_WRITE
	IO_TASK_M_FLUSH
	IO_TASK_M_FETCH
)

Variables

This section is empty.

Functions

func Commit

func Commit(seriesID string, items []*dataobj.TsdbItem)

todo items数据结构优化

func Fetch

func Fetch(filename string, seriesID string, cf string, start, end int64, step int) ([]*dataobj.RRDData, error)

func FlushFile

func FlushFile(seriesID string, items []*dataobj.TsdbItem) error

func FlushFinishd2Disk

func FlushFinishd2Disk()

func FlushRRD

func FlushRRD(flushChunks map[string][]*cache.Chunk)

func Flushrrd

func Flushrrd(seriesID string, items []*dataobj.TsdbItem) error

flush to disk from memory 最新的数据在列表的最后面

func Init

func Init(cfg RRDSection)

func InitChannel

func InitChannel()

func Persist

func Persist()

func ReadFile

func ReadFile(filename string, seriesID string) ([]byte, error)

func Start

func Start()

Types

type File

type File struct {
	Filename string
	Body     []byte
}

type RRDSection

type RRDSection struct {
	Enabled     bool        `yaml:"enabled"`
	Migrate     bool        `yaml:"enabled"`
	Storage     string      `yaml:"storage"`
	Batch       int         `yaml:"batch"`
	Concurrency int         `yaml:"concurrency"`
	Wait        int         `yaml:"wait"`
	RRA         map[int]int `yaml:"rra"`
	IOWorkerNum int         `yaml:"ioWorkerNum"`
}
var (
	Out_done_chan chan int

	Config RRDSection
)

Jump to

Keyboard shortcuts

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