rrdtool

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2020 License: Apache-2.0 Imports: 18 Imported by: 5

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 interface{}, items []*dataobj.TsdbItem)

todo items数据结构优化

func Fetch

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

func FlushFile

func FlushFile(seriesID interface{}, items []*dataobj.TsdbItem) error

func FlushFinishd2Disk

func FlushFinishd2Disk()

func FlushRRD

func FlushRRD(flushChunks map[interface{}][]*cache.Chunk)

func Flushrrd

func Flushrrd(seriesID interface{}, 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 interface{}) ([]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