agent

package
v0.0.0-...-2987df4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version    string
	Commit     string
	Branch     string
	BuildStamp string
)

Version X.Y.Z based versioning

View Source
var (
	// Bus the bus messaging system to send messages over the hmc
	Bus = bus.NewBus()

	// MainConfig has all configuration
	MainConfig config.Config

	// DBConfig db config
	DBConfig config.DBConfig
)

Functions

func CheckAndSetReloadProcess

func CheckAndSetReloadProcess() bool

CheckAndSetReloadProcess set the reloadProcess flat to true and return the last stat before true set

func CheckAndUnSetReloadProcess

func CheckAndUnSetReloadProcess() bool

CheckAndUnSetReloadProcess set the reloadProcess flat to false and return the last stat before true set

func CheckReloadProcess

func CheckReloadProcess() bool

CheckReloadProcess check if the agent is doing a reloading just now

func DeviceProcessStart

func DeviceProcessStart()

DeviceProcessStart start all hmc goroutines

func DeviceProcessStop

func DeviceProcessStop()

DeviceProcessStop stop all device goroutines

func GetDevStats

func GetDevStats() map[string]*devices.DevStat

GetDevStats xx

func GetDevice

func GetDevice(id string) (devices.Device, error)

GetDevice is a safe method to get a Device Object

func GetDeviceJSONInfo

func GetDeviceJSONInfo(id string) ([]byte, error)

GetDeviceJSONInfo get device data in JSON format just if not doing a reloading process

func LoadConf

func LoadConf()

LoadConf call to initialize alln configurations

func PrepareInfluxDBs

func PrepareInfluxDBs() map[string]*output.InfluxDB

PrepareInfluxDBs review all configured db's in the SQL database and check if exist at least a "default", if not creates a dummy db which does nothing

func ReleaseDevices

func ReleaseDevices()

ReleaseDevices Executes End for each device

func ReleaseInfluxOut

func ReleaseInfluxOut(idb map[string]*output.InfluxDB)

ReleaseInfluxOut xx

func ReloadConf

func ReloadConf() (time.Duration, error)

ReloadConf call to reinitialize alln configurations

func SetDefTimeZone

func SetDefTimeZone(tz string)

func SetLogger

func SetLogger(l *logrus.Logger)

SetLogger set log output

func StopInfluxOut

func StopInfluxOut(idb map[string]*output.InfluxDB)

StopInfluxOut xx

Types

type RInfo

type RInfo struct {
	InstanceID string
	Version    string
	Commit     string
	Branch     string
	BuildStamp string
}

RInfo Release basic version info for the agent

func GetRInfo

func GetRInfo() *RInfo

GetRInfo return Release Agent Information

Directories

Path Synopsis
hmc

Jump to

Keyboard shortcuts

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