myvar_class

package
v0.0.0-...-693abe4 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float

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

Float

func (*Float) Add

func (f *Float) Add(delta float64)

func (*Float) Set

func (f *Float) Set(v float64)

func (*Float) Value

func (f *Float) Value() float64

type InstanceMyVar

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

func NewMyVar

func NewMyVar(addr, db string, interval time.Duration) (*InstanceMyVar, error)

NewMyVar inits an instance of MyVarClass

func (*InstanceMyVar) Flush

func (mv *InstanceMyVar) Flush(tt ...time.Time) error

Flush write all the points in cache into influxdb

func (*InstanceMyVar) FreeFloat

func (mv *InstanceMyVar) FreeFloat(f *Float)

func (*InstanceMyVar) FreeInt

func (mv *InstanceMyVar) FreeInt(n *Int)

func (*InstanceMyVar) FreeMap

func (mv *InstanceMyVar) FreeMap(m *Map)

func (*InstanceMyVar) FreeString

func (mv *InstanceMyVar) FreeString(s *String)

func (*InstanceMyVar) GetDatabase

func (mv *InstanceMyVar) GetDatabase() string

GetDatabase returns db used for monitoring

func (*InstanceMyVar) GetInfluxClient

func (mv *InstanceMyVar) GetInfluxClient() client.Client

GetInfluxClient return influxdb client

func (*InstanceMyVar) NewFloat

func (mv *InstanceMyVar) NewFloat(measurement string, tags map[string]string, name string) *Float

func (*InstanceMyVar) NewInt

func (mv *InstanceMyVar) NewInt(measurement string, tags map[string]string, name string) *Int

func (*InstanceMyVar) NewMap

func (mv *InstanceMyVar) NewMap(measurement string, tags map[string]string) *Map

func (*InstanceMyVar) NewString

func (mv *InstanceMyVar) NewString(measurement string, tags map[string]string, name string) *String

func (*InstanceMyVar) Publish

func (mv *InstanceMyVar) Publish(name string, tags map[string]string, fields map[string]interface{}) error

Publish a raw influxdb points

func (*InstanceMyVar) SetGlobalTag

func (mv *InstanceMyVar) SetGlobalTag(key, value string)

SetGlobalTag set global tag list, used by each variable

type Int

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

Int

func (*Int) Add

func (n *Int) Add(v int64)

func (*Int) Incr

func (n *Int) Incr()

func (*Int) Set

func (n *Int) Set(v int64)

func (*Int) Value

func (n *Int) Value() int64

type Map

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

Map

func (Map) DelEntry

func (m Map) DelEntry(k interface{})

func (*Map) Get

func (m *Map) Get(key string) (interface{}, bool)

func (Map) GetData

func (m Map) GetData() sync.Map

func (Map) RangeFunc

func (m Map) RangeFunc(f func(key, value interface{}) bool)

func (*Map) Set

func (m *Map) Set(key string, value interface{}) *Map

type String

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

String

func (*String) Set

func (s *String) Set(v string)

func (*String) Value

func (s *String) Value() string

type Var

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

Var

func (Var) GetMeasurement

func (v Var) GetMeasurement() string

func (Var) GetName

func (v Var) GetName() string

func (Var) GetTags

func (v Var) GetTags() models.Tags

func (Var) GetValue

func (v Var) GetValue() interface{}

Jump to

Keyboard shortcuts

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