rrdtool

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0, Apache-2.0 Imports: 20 Imported by: 93

Documentation

Index

Constants

View Source
const (
	NET_TASK_M_SEND
	NET_TASK_M_QUERY
	NET_TASK_M_PULL
)
View Source
const (
	FETCH_S_SUCCESS = iota
	FETCH_S_ERR
	FETCH_S_ISNOTEXIST
	SEND_S_SUCCESS
	SEND_S_ERR
	QUERY_S_SUCCESS
	QUERY_S_ERR
	CONN_S_ERR
	CONN_S_DIAL
	STAT_SIZE
)
View Source
const (
	RRA1PointCnt   = 720 // 1m一个点存12h
	RRA5PointCnt   = 576 // 5m一个点存2d
	RRA20PointCnt  = 504 // 20m一个点存7d
	RRA180PointCnt = 766 // 3h一个点存3month
	RRA720PointCnt = 730 // 12h一个点存1year
)

RRA.Point.Size

View Source
const (
	IO_TASK_M_READ
	IO_TASK_M_WRITE
	IO_TASK_M_FLUSH
	IO_TASK_M_FETCH
)

Variables

View Source
var (
	Consistent  *consistent.Consistent
	Net_task_ch map[string]chan *Net_task_t
)
View Source
var (
	Out_done_chan chan int
)

Functions

func CommitByKey

func CommitByKey(key string)

func Fetch

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

func FlushAll

func FlushAll(force bool)

func FlushFile

func FlushFile(filename, md5 string, items []*cmodel.GraphItem) error

func FlushRRD

func FlushRRD(idx int, force bool)

func GetCounter

func GetCounter() (ret string)

func InitChannel added in v0.2.2

func InitChannel()

func PullByKey

func PullByKey(key string)

func ReadFile

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

func Start

func Start()

Types

type MigrateCounter added in v0.2.2

type MigrateCounter struct {
	FetchSuccess  uint64
	FetchErr      uint64
	FetchNotExist uint64
	SendSuccess   uint64
	SendErr       uint64
	QuerySuccess  uint64
	QueryErr      uint64
	ConnErr       uint64
	ConnDial      uint64
}

func GetCounterV2 added in v0.2.2

func GetCounterV2() *MigrateCounter

type Net_task_t

type Net_task_t struct {
	Method int
	Key    string
	Done   chan error
	Args   interface{}
	Reply  interface{}
}

Jump to

Keyboard shortcuts

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