stat

package
v0.0.0-...-0e6b51b Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOpenlib

func AddOpenlib(stype string, fn func(config interface{}) (Client, error))

func HandleFunc

func HandleFunc() func(resp http.ResponseWriter, req *http.Request)

func SetLog

func SetLog(st Client, name string)

func Sys

func Sys(st Client, keepalive time.Duration, name string)

func SysLog

func SysLog(keepalive time.Duration, name string)

Types

type Client

type Client interface {
	Close()
	Write(name string, tags map[string]string, fields map[string]interface{}, tv time.Time) error
}

func OpenClient

func OpenClient(stype string, config interface{}) (Client, error)

type ClientLog

type ClientLog struct {
	// contains filtered or unexported fields
}

func (*ClientLog) Write

func (L *ClientLog) Write(p []byte) (n int, err error)

type InfluxClient

type InfluxClient struct {
	// contains filtered or unexported fields
}

func NewInfluxClient

func NewInfluxClient(addr string, user string, password string, db string) (*InfluxClient, error)

func (*InfluxClient) Close

func (C *InfluxClient) Close()

func (*InfluxClient) Write

func (C *InfluxClient) Write(name string, tags map[string]string, fields map[string]interface{}, tv time.Time) error

type Object

type Object struct {
	Name   string                 `json:"name"`
	Tags   map[string]string      `json:"tags"`
	Fields map[string]interface{} `json:"fields"`
	Tv     int64                  `json:"tv"`
}

func GetSysObject

func GetSysObject() *Object

Jump to

Keyboard shortcuts

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