client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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

BatchRestart 批量重启服务

func (*ControllerClient) BatchStart

BatchStart 批量启动服务

func (*ControllerClient) BatchStop

BatchStop 批量停止服务

func (*ControllerClient) BatchUpdateConfigs

BatchUpdateConfigs 批量更新配置

func (*ControllerClient) GetAgent

func (c *ControllerClient) GetAgent(ctx context.Context, agentID string) (*models.Agent, error)

GetAgent 获取 Agent 详情

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 设置请求超时时间

Jump to

Keyboard shortcuts

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