util

package
v0.0.0-...-d050cfb Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion(path string) (string, error)

Types

type Agent

type Agent struct {
	AppName      string `db:"app_name" json:"applicationName"  msg:"applicationName"`
	AgentID      string `db:"agent_id" json:"agentId"  msg:"agentId"`
	Type         int32  `db:"ser_type" json:"serviceType"  msg:"serviceType"`
	HostName     string `db:"host_name" json:"hostName" msg:"hostName"`
	IP4S         string `db:"ip" json:"ip" msg:"ip"`
	Pid          int32  `db:"pid" json:"pid" msg:"pid"`
	Version      string `db:"version" json:"version" msg:"version"`
	StartTime    int64  `db:"start_time" json:"startTimestamp" msg:"startTimestamp"`
	StopTime     int64  `db:"end_time" json:"end_time" msg:"end_time"`
	IsLive       bool   `db:"is_live" json:"is_live" msg:"is_live"`
	IsContainer  bool   `db:"is_container" json:"is_container" msg:"is_container"`
	OperatingEnv int32  `db:"operating_env" json:"operating_env" msg:"operating_env"`
}

Agent ...

func NewAgent

func NewAgent() *Agent

NewAgent ...

type AgentdInfo

type AgentdInfo struct {
	Hostname         string `json:"hn"`
	StartTime        int64  `json:"st"`
	DownloadTimes    int    `json:"dt"`
	RestartTimes     int    `json:"rt"`
	LastDownloadTime int64  `json:"ldt"`
	LastRestartTime  int64  `json:"lrt"`
	AgentdVersion    string `json:"adv"`
	AgentVersion     string `json:"av"`
	DownloadVersion  string `json:"dv"`
	AdminPort        string `json:"ap"`
	UpdateTime       int64  `json:"ut"`
}

type Alert

type Alert struct {
	Name     string  `json:"name" cql:"name"`
	Type     string  `json:"type" cql:"type"`
	Label    string  `json:"label" cql:"label"`
	Compare  int     `json:"compare" cql:"compare"`
	Unit     string  `json:"unit" cql:"unit"`
	Duration int     `json:"duration" cql:"duration"`
	Keys     string  `json:"keys" cql:"keys"`
	Value    float64 `json:"value" cql:"value"`
}

type AlertKV

type AlertKV struct {
	Key   string  `json:"key" cql:"key"`
	Value float64 `json:"value" cql:"value"`
}

type ApiAlert

type ApiAlert struct {
	Api    string     `json:"api" cql:"api"`
	Alerts []*AlertKV `json:"alerts" cql:"alerts"`
}

ApiAlert ...

type HealthResult

type HealthResult struct {
	Success bool   `json:"sc"`
	Version string `json:"v"`
}

Jump to

Keyboard shortcuts

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