Versions in this module Expand all Collapse all v0 v0.0.10 Apr 10, 2026 v0.0.9 Mar 17, 2026 Changes in this version + const AppName + func GetHostname() string + func GetNodeIP() (string, error) + type CleanMetricRequest struct + BeforeHours int64 + func NewCleanMetricRequest(beforeHours int64) *CleanMetricRequest + type CleanMetricResponse struct + Deleted int64 + type Node struct + BuildTime string + Id string + Labels string + LastSeen time.Time + NodeIP string + NodeName string + NodePort int + RegisterTime time.Time + Status NodeStatus + Version string + func NewNode(req *RegisterNodeRequest) *Node + func (n *Node) TableName() string + type NodeMetric struct + AgentId string + CPUCores int + CPUUsagePercent float64 + DiskTotalGB int64 + DiskUsagePercent float64 + DiskUsedGB int64 + FileHandleUsagePercent float64 + GoroutineCount int + Id int64 + InodeUsagePercent float64 + LoadAverage1 float64 + LoadAverage15 float64 + LoadAverage5 float64 + MemoryTotalMB int64 + MemoryUsagePercent float64 + MemoryUsedMB int64 + ProcessCount int + ReportTime time.Time + RunningTasks int + func (m *NodeMetric) TableName() string + type NodeStatus string + const NODE_STATUS_OFFLINE + const NODE_STATUS_ONLINE + type QueryAgentMetricRequest struct + AgentId string + func NewQueryAgentMetricRequest(agentId string) *QueryAgentMetricRequest + type QueryNodeRequest struct + NodeName string + Status NodeStatus + func NewQueryNodeRequest() *QueryNodeRequest + type RegisterNodeRequest struct + BuildTime string + Labels map[string]string + NodeIP string + NodeName string + NodePort int + Version string + type Service interface + CleanMetric func(ctx context.Context, in *CleanMetricRequest) (*CleanMetricResponse, error) + DescribeLatestMetric func(ctx context.Context, agentId string) (*NodeMetric, error) + DescribeNode func(ctx context.Context, nodeName string) (*Node, error) + QueryAgentMetric func(ctx context.Context, in *QueryAgentMetricRequest) (*types.Set[*NodeMetric], error) + QueryNodes func(ctx context.Context, in *QueryNodeRequest) (*types.Set[*Node], error) + SaveAgentMetric func(ctx context.Context, in *NodeMetric) error + func GetService() Service