API Reference
Class
AgentSender
Sends agent payloads and handles buffering/retries.
Inheritance
- Object
- AgentSender
Constructors
public AgentSender(AgentConfig config, JsonSerializerOptions jsonOptions, String bufferDirectory) #Creates a new agent sender.
Parameters
- config ComputerX.Agent.AgentConfig
- jsonOptions System.Text.Json.JsonSerializerOptions
- bufferDirectory System.String
Methods
public Task<AgentBufferStats> GetBufferStatsAsync(CancellationToken cancellationToken) #Returns:
Task<AgentBufferStats>Returns a snapshot of the current buffer state.
Parameters
- cancellationToken System.Threading.CancellationToken
public async Task<AgentSendResult> SendAsync(AgentMetricsEnvelope envelope, String agentId, String agentName, Dictionary<String, String> tags, CancellationToken cancellationToken) #Returns:
Task<AgentSendResult>Sends a payload or enqueues it for later retry.
Parameters
- envelope ComputerX.Agent.AgentMetricsEnvelope
- agentId System.String
- agentName System.String
- tags System.Collections.Generic.Dictionary{System.String,System.String}
- cancellationToken System.Threading.CancellationToken
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object