Documentation
¶
Index ¶
- type ControllerClient
- func (c *ControllerClient) BatchRestart(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error)
- func (c *ControllerClient) BatchStart(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error)
- func (c *ControllerClient) BatchStop(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error)
- func (c *ControllerClient) BatchUpdateConfigs(ctx context.Context, req *models.BatchConfigRequest) (*models.BatchOperationResult, error)
- func (c *ControllerClient) GetAgent(ctx context.Context, agentID string) (*models.Agent, error)
- func (c *ControllerClient) GetAgentHealth(ctx context.Context, agentID string) (map[string]interface{}, error)
- func (c *ControllerClient) GetAgentPackages(ctx context.Context, agentID string) ([]models.PackageStatus, error)
- func (c *ControllerClient) GetServiceHealth(ctx context.Context, agentID, packageName string) (map[string]interface{}, error)
- func (c *ControllerClient) GetServiceMetrics(ctx context.Context, agentID string) (map[string]interface{}, error)
- func (c *ControllerClient) GetSystemMetrics(ctx context.Context, agentID string) (map[string]interface{}, error)
- func (c *ControllerClient) ListAgents(ctx context.Context, filters map[string]string, page, pageSize int) (*models.AgentsResponse, error)
- func (c *ControllerClient) SetTimeout(timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerClient ¶
type ControllerClient struct {
// contains filtered or unexported fields
}
ControllerClient Controller HTTP API 客户端
func NewControllerClient ¶
func NewControllerClient(baseURL string, area string) *ControllerClient
NewControllerClient 创建 Controller 客户端
func (*ControllerClient) BatchRestart ¶
func (c *ControllerClient) BatchRestart(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error)
BatchRestart 批量重启服务
func (*ControllerClient) BatchStart ¶
func (c *ControllerClient) BatchStart(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error)
BatchStart 批量启动服务
func (*ControllerClient) BatchStop ¶
func (c *ControllerClient) BatchStop(ctx context.Context, req *models.BatchOperationRequest) (*models.BatchOperationResult, error)
BatchStop 批量停止服务
func (*ControllerClient) BatchUpdateConfigs ¶
func (c *ControllerClient) BatchUpdateConfigs(ctx context.Context, req *models.BatchConfigRequest) (*models.BatchOperationResult, error)
BatchUpdateConfigs 批量更新配置
func (*ControllerClient) GetAgentHealth ¶
func (c *ControllerClient) GetAgentHealth(ctx context.Context, agentID string) (map[string]interface{}, error)
GetAgentHealth 获取 Agent 所有服务的健康状态
func (*ControllerClient) GetAgentPackages ¶
func (c *ControllerClient) GetAgentPackages(ctx context.Context, agentID string) ([]models.PackageStatus, error)
GetAgentPackages 获取 Agent 管理的服务列表
func (*ControllerClient) GetServiceHealth ¶
func (c *ControllerClient) GetServiceHealth(ctx context.Context, agentID, packageName string) (map[string]interface{}, error)
GetServiceHealth 获取指定服务的健康状态
func (*ControllerClient) GetServiceMetrics ¶
func (c *ControllerClient) GetServiceMetrics(ctx context.Context, agentID string) (map[string]interface{}, error)
GetServiceMetrics 获取服务指标
func (*ControllerClient) GetSystemMetrics ¶
func (c *ControllerClient) GetSystemMetrics(ctx context.Context, agentID string) (map[string]interface{}, error)
GetSystemMetrics 获取系统指标
func (*ControllerClient) ListAgents ¶
func (c *ControllerClient) ListAgents(ctx context.Context, filters map[string]string, page, pageSize int) (*models.AgentsResponse, error)
ListAgents 获取区域内的 Agent 列表
func (*ControllerClient) SetTimeout ¶
func (c *ControllerClient) SetTimeout(timeout time.Duration)
SetTimeout 设置请求超时时间
Click to show internal directories.
Click to hide internal directories.