selfmon

package
v0.0.0-...-b03fc3e Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(l *logrus.Logger)

SetLogger set log output

Types

type SelfMon

type SelfMon struct {
	Influx *output.InfluxDB

	TagMap map[string]string
	Fields map[string]interface{}
	// contains filtered or unexported fields
}

SelfMon configuration for self monitoring

func NewNotInit

func NewNotInit(c *config.SelfMonConfig) *SelfMon

NewNotInit create strut without initialization

func (*SelfMon) AddDeviceMetrics

func (sm *SelfMon) AddDeviceMetrics(deviceid string, fields map[string]interface{}, devtags map[string]string)

AddDeviceMetrics add data from devices

func (*SelfMon) CheckAndSetInitialized

func (sm *SelfMon) CheckAndSetInitialized() bool

CheckAndSetInitialized set

func (*SelfMon) CheckAndUnSetInitialized

func (sm *SelfMon) CheckAndUnSetInitialized() bool

CheckAndUnSetInitialized unset

func (*SelfMon) End

func (sm *SelfMon) End()

func (*SelfMon) Init

func (sm *SelfMon) Init()

Init Initialize the Object data and check for consistence

func (*SelfMon) IsInitialized

func (sm *SelfMon) IsInitialized() bool

IsInitialized check if this thread is already working

func (*SelfMon) SetOutput

func (sm *SelfMon) SetOutput(val *output.InfluxDB)

SetOutput set out data

func (*SelfMon) StartGather

func (sm *SelfMon) StartGather(wg *sync.WaitGroup)

StartGather for stopping selfmonitori goroutine

func (*SelfMon) StopGather

func (sm *SelfMon) StopGather()

StopGather for stopping selfmonitori goroutine

Jump to

Keyboard shortcuts

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