Documentation ¶
Index ¶
- Constants
- func CheckGCStats() func()
- func CreateInitialToken() string
- func GetCurrentToken() string
- func MonitorApi() *monitorApi
- func SetSoftMemoryCap()
- func ShowMonitor(ctx context.Context)
- func StartDumpTrafficLog(ctx context.Context)
- func StopDumpTrafficLog()
- func StopMonitor()
- func TerminalAPI() *terminalCmd
- func TrafficInfoToMonitorClient(t TrafficInfo)
- type BaseServer
- type CmdResult
- type CpuInfo
- type DiskUsage
- type HdInfo
- type MemInfo
- type MonitorNotificationResult
- type MonitorResult
- type NodeDetails
- type OnlineState
- type ParamMonitor
- type ParamTrafficInfo
- type SingleCpuInfo
- type TrafficDumpInfo
- type TrafficInfo
Constants ¶
View Source
const ( MSG_GET_TRAFFIC_DATA_RESPONSE = "monitor_getTrafficData" MSG_GET_DIST_USAGE_RESPONSE = "monitor_getDiskUsage" MSG_GET_ONLINE_STATE = "monitor_getOnlineState" MSG_GET_NODE_DETAILS = "monitor_getNodeDetails" )
View Source
const ( INVALID_MEM_LIMIT_FOR_READING = -1 CHECK_GCSTATS_INTERVAL = 30 * time.Second THRESHOLD_GC_OVER_TRIGGERED = 30 THRESHOLD_NUM_CONSEC_STAY_HIGH = 3 )
View Source
const ( DefaultMsg = "Request Accepted" DefaultDesiredUploadTier = 2 )
Variables ¶
This section is empty.
Functions ¶
func CheckGCStats ¶ added in v0.12.0
func CheckGCStats() func()
func CreateInitialToken ¶ added in v0.9.0
func CreateInitialToken() string
CreateInitialToken the initial token is used to generate all following tokens
func MonitorApi ¶ added in v0.9.0
func MonitorApi() *monitorApi
func SetSoftMemoryCap ¶ added in v0.12.0
func SetSoftMemoryCap()
func StartDumpTrafficLog ¶ added in v0.5.0
func StopDumpTrafficLog ¶ added in v0.5.0
func StopDumpTrafficLog()
func TerminalAPI ¶ added in v0.5.0
func TerminalAPI() *terminalCmd
func TrafficInfoToMonitorClient ¶ added in v0.9.0
func TrafficInfoToMonitorClient(t TrafficInfo)
TrafficInfoToMonitorClient traffic info generator calls this to feed the notifiers to the subscribed clients
Types ¶
type BaseServer ¶ added in v0.9.0
type BaseServer struct {
// contains filtered or unexported fields
}
BaseServer base pp server
func (*BaseServer) Start ¶ added in v0.9.0
func (bs *BaseServer) Start() error
func (*BaseServer) Stop ¶ added in v0.9.0
func (bs *BaseServer) Stop()
type CpuInfo ¶ added in v0.5.0
type CpuInfo struct { CpuInfos []SingleCpuInfo `json:"cpu_infos"` CpuUsedPercent float64 `json:"cpu_used_percent"` }
func NewCpuInfo ¶ added in v0.5.0
func NewCpuInfo(cpuInfos []SingleCpuInfo, cpuUsedPercent float64) CpuInfo
type HdInfo ¶ added in v0.5.0
type MemInfo ¶ added in v0.5.0
type MonitorNotificationResult ¶ added in v0.9.0
type MonitorNotificationResult struct { TrafficInfo *TrafficInfo `json:"traffic_info"` OnlineState *OnlineState `json:"online_state,omitempty"` DiskUsage *DiskUsage `json:"disk_usage,omitempty"` }
type MonitorResult ¶ added in v0.9.0
type MonitorResult struct { Return string `json:"return"` MessageType string `json:"message_type"` TrafficInfo *[]TrafficInfo `json:"traffic_info,omitempty"` OnlineState *OnlineState `json:"online_state,omitempty"` DiskUsage *DiskUsage `json:"disk_usage,omitempty"` NodeDetails *NodeDetails `json:"node_details,omitempty"` }
type NodeDetails ¶ added in v0.9.0
type OnlineState ¶ added in v0.9.0
type ParamMonitor ¶ added in v0.9.0
type ParamMonitor struct {
SubId string `json:"subid"`
}
type ParamTrafficInfo ¶ added in v0.9.0
type SingleCpuInfo ¶ added in v0.5.0
type SingleCpuInfo struct { CpuModelName string `json:"cpu_model_name"` CpuCores int32 `json:"cpu_cores"` }
func NewSingleCpuInfo ¶ added in v0.5.0
func NewSingleCpuInfo(cpuModelName string, cpuCores int32) SingleCpuInfo
type TrafficDumpInfo ¶ added in v0.5.0
type TrafficDumpInfo struct { MemInfo MemInfo `json:"mem_info"` CpuInfo CpuInfo `json:"cpu_info"` HdInfo HdInfo `json:"hd_info"` TrafficInfo TrafficInfo `json:"traffic_info"` }
func NewTrafficDumpInfo ¶ added in v0.5.0
func NewTrafficDumpInfo(memInfo MemInfo, cpuInfo CpuInfo, hdInfo HdInfo, trafficInfo TrafficInfo) TrafficDumpInfo
type TrafficInfo ¶ added in v0.5.0
type TrafficInfo struct { TrafficInbound uint64 `json:"traffic_inbound"` TrafficOutbound uint64 `json:"traffic_outbound"` TimeStamp string `json:"time_stamp,omitempty"` }
func NewTrafficInfo ¶ added in v0.5.0
func NewTrafficInfo(trafficInbound uint64, trafficOutbound uint64) TrafficInfo
Click to show internal directories.
Click to hide internal directories.