rrdtool

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0, Apache-2.0 Imports: 19 Imported by: 0

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 (
	RRA5sPointCnt  = 259200 //5s原始一个点存15d
	RRA10sPointCnt = 129600 //10s原始一个点存15d
	RRA30sPointCnt = 43200  //30s原始一个点存15d
	RRA1mPointCnt  = 21600  //1m原始一个点存15d
	RRA5mPointCnt  = 4320   //5m原始一个点存15d
	RRA1hPointCnt  = 360    //1h原始一个点存15d

	RRA20PointCnt  = 4320 // 20m一个点存60d
	RRA180PointCnt = 720  // 3h一个点存90d
	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, cf string, start, end int64, step int) ([]*cmodel.RRDData, error)

func FlushAll

func FlushAll(force bool)

func FlushFile

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

func FlushRRD

func FlushRRD(idx int, force bool)

func GetCounter

func GetCounter() (ret string)

func PullByKey

func PullByKey(key string)

func ReadFile

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

func Start

func Start()

Types

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