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 + type AgentServiceImpl struct + BalanceMinAgents int + BalanceThreshold float64 + HeartbeatBatchInterval time.Duration + HeartbeatBatchSize int + HeartbeatTopic string + NodeName string + NodeTimeout int64 + RedisKeyNodeActive string + RedisKeyNodeAgents string + RedisKeyNodeLastHeartbeat string + RegistryLockTimeoutSeconds int64 + ScheduledConfirmTTL int64 + TaskRunTopic string + func (i *AgentServiceImpl) AddConn(conn *agent.Connection) + func (i *AgentServiceImpl) CheckBalanceBeforeRegister(ctx context.Context, agentId string) (*BalanceDecision, error) + func (i *AgentServiceImpl) Close(ctx context.Context) + func (i *AgentServiceImpl) CloseConnection(ctx context.Context, in *agent.CloseConnectionRequest) error + func (i *AgentServiceImpl) ConnExists(agentId string) bool + func (i *AgentServiceImpl) CreateAgent(ctx context.Context, in *agent.CreateAgentRequest) (*agent.Agent, error) + func (i *AgentServiceImpl) DecrementAgentCount(ctx context.Context) error + func (i *AgentServiceImpl) DelConn(agentId string) + func (i *AgentServiceImpl) DescribeAgent(ctx context.Context, in *agent.DescribeAgentRequest) (*agent.Agent, error) + func (i *AgentServiceImpl) GetAndRemoveConn(agentId string) *agent.Connection + func (i *AgentServiceImpl) GetConnection(ctx context.Context, in *agent.GetConnectionRequest) (*agent.Connection, error) + func (i *AgentServiceImpl) GetCurrentNodeLoad(ctx context.Context) (*NodeLoadInfo, error) + func (i *AgentServiceImpl) GetHeartbeatBufferSize() int + func (i *AgentServiceImpl) HanleTaskResponse(ctx context.Context) error + func (i *AgentServiceImpl) HeartbeatReport(ctx context.Context, in *agent.HeartbeatReportRequest) (*agent.HeartbeatReportResponse, error) + func (i *AgentServiceImpl) IncrementAgentCount(ctx context.Context) error + func (i *AgentServiceImpl) Init() error + func (i *AgentServiceImpl) Name() string + func (i *AgentServiceImpl) RegisterAgent(ctx context.Context, in *agent.AgentRegistryRequest) (*agent.Connection, error) + func (i *AgentServiceImpl) RunTask(ctx context.Context, in *task.Task) error + func (i *AgentServiceImpl) ScheduledAgent(ctx context.Context, in *task.Task) (*agent.Agent, error) + func (i *AgentServiceImpl) UpdateAgent(ctx context.Context, in *agent.UpdateAgentRequest) (*agent.Agent, error) + func (i *AgentServiceImpl) WithConn(agentId string, fn func(conn *agent.Connection) error) error + func (s *AgentServiceImpl) QueryAgent(ctx context.Context, in *agent.QueryAgentRequest) (*types.Set[*agent.Agent], error) + type BalanceDecision struct + Allowed bool + AverageCount float64 + CurrentCount int64 + Reason string + SuggestedNode string + type HeartbeatEvent struct + AgentId string + Status *agent.AgentStatus + Timestamp time.Time + type MetricResponseHandler struct + func NewMetricResponseHandler(logger *zerolog.Logger) *MetricResponseHandler + func (h *MetricResponseHandler) HandleResponse(ctx context.Context, msg *agent.AgentMessage) error + type NodeLoadInfo struct + AgentCount int64 + IsActive bool + LastHeartbeat int64 + NodeName string + type TaskMessageDispatcher struct + func NewTaskMessageDispatcher(logger *zerolog.Logger) *TaskMessageDispatcher + func (d *TaskMessageDispatcher) HandleResponse(ctx context.Context, msg *agent.AgentMessage) error + func (d *TaskMessageDispatcher) Register(requestId string, handler agent.ResponseHandler) + func (d *TaskMessageDispatcher) Unregister(requestId string) + type TaskResponseHandler struct + func NewTaskResponseHandler(taskId string, logger *zerolog.Logger) *TaskResponseHandler + func (h *TaskResponseHandler) HandleResponse(ctx context.Context, msg *agent.AgentMessage) error