Documentation
¶
Index ¶
- func GoStringArrayToCptr(arr []string) **C.char
- func NewRawCMTPointer() (unsafe.Pointer, error)
- type Context
- func (ctx *Context) CounterCreate(namespace, subsystem, name, help string, labelKeys []string) (*Counter, error)
- func (ctx *Context) Destroy()
- func (ctx *Context) Encode(t EncoderType) (interface{}, error)
- func (ctx *Context) EncodeInflux() (string, error)
- func (ctx *Context) EncodeMsgPack() ([]byte, error)
- func (ctx *Context) EncodePrometheus() (string, error)
- func (ctx *Context) EncodeText() (string, error)
- func (ctx *Context) GaugeCreate(namespace, subsystem, name, help string, labelKeys []string) (*Gauge, error)
- func (ctx *Context) LabelAdd(key, val string) error
- type Counter
- type EncoderType
- type Gauge
- func (g *Gauge) Add(ts time.Time, value float64, labels []string) error
- func (g *Gauge) Dec(ts time.Time, labels []string) error
- func (g *Gauge) GetVal(labels []string) (float64, error)
- func (g *Gauge) Inc(ts time.Time, labels []string) error
- func (g *Gauge) Set(ts time.Time, value float64, labels []string) error
- func (g *Gauge) Sub(ts time.Time, value float64, labels []string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoStringArrayToCptr ¶
func NewRawCMTPointer ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContextFromMsgPack ¶
func (*Context) CounterCreate ¶
func (*Context) Encode ¶
func (ctx *Context) Encode(t EncoderType) (interface{}, error)
func (*Context) EncodeInflux ¶
func (*Context) EncodeMsgPack ¶
func (*Context) EncodePrometheus ¶
func (*Context) EncodeText ¶
func (*Context) GaugeCreate ¶
type EncoderType ¶
type EncoderType string
const ( MsgPackEncoder EncoderType = "MsgPackEncoder" PrometheusEncoder EncoderType = "PrometheusEncoder" InfluxEncoder EncoderType = "InfluxEncoder" TextEncoder EncoderType = "TextEncoder" )
Click to show internal directories.
Click to hide internal directories.