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 APP_NAME + const DefaultBufferSize + const DefaultFlushInterval + func RegistryTaskHandler(t task.TYPE, h agent.TaskHandler) + type Client struct + AgentId string + AgentKey string + HandshakeTimeoutSecond int + PingInterval int + RetryQueueBatchLoadSize int + RetryQueueCleanupInterval string + RetryQueueDir string + RetryQueueDiskSize int + RetryQueueDiskTTL string + RetryQueueLoadInterval string + RetryQueueMaxRetries int + RetryQueueMemorySize int + RetryQueueWarningThreshold int + ServerAddress string + func Get() *Client + func (c *Client) Close(ctx context.Context) + func (c *Client) CloseLogBuffer(taskId string) error + func (c *Client) Connect() error + func (c *Client) GetOrCreateLogBuffer(requestId, taskId string) *LogBuffer + func (c *Client) GetRetryQueue() *RetryQueue + func (c *Client) GetRetryQueueCleanupInterval() time.Duration + func (c *Client) GetRetryQueueDiskTTL() time.Duration + func (c *Client) GetRetryQueueLoadInterval() time.Duration + func (c *Client) Init() error + func (c *Client) IsConnected() bool + func (c *Client) Name() string + func (c *Client) SendTaskConfirm(requestId, taskId string) error + func (c *Client) SendTaskLog(requestId, taskId, content string) error + func (c *Client) SendTaskLogBuffered(requestId, taskId, content string) error + func (c *Client) SendTaskResult(requestId string, resp *agent.RunTaskResponse) error + type LogBuffer struct + func NewLogBuffer(client *Client, requestId, taskId string) *LogBuffer + func (lb *LogBuffer) Close() error + func (lb *LogBuffer) Flush() error + func (lb *LogBuffer) Write(content string) error + type RetryMessage struct + Attempt int + CreatedAt time.Time + ID string + Message *protocol.Message + RetryAt time.Time + Status string + type RetryQueue struct + func NewRetryQueue(client *Client, diskDir string) (*RetryQueue, error) + func (rq *RetryQueue) Close() error + func (rq *RetryQueue) Enqueue(msg *protocol.Message) error + func (rq *RetryQueue) GetStats() map[string]any + func (rq *RetryQueue) ProcessRetries()