API Reference
Class
AgentJsonlBuffer
Simple JSONL-based buffer for agent payloads.
Inheritance
- Object
- AgentJsonlBuffer
Constructors
public AgentJsonlBuffer(String directory, AgentBufferConfig config, JsonSerializerOptions jsonOptions) #Creates a new JSONL buffer in the provided directory.
Parameters
- directory System.String
- config ComputerX.Agent.AgentBufferConfig
- jsonOptions System.Text.Json.JsonSerializerOptions
Methods
public Void DeleteBatchFile(String filePath) #Returns:
VoidRemoves a buffer file after successful send.
Parameters
- filePath System.String
public async Task<ValueTuple<String, List<AgentMetricsEnvelope>, Boolean>> DequeueBatchAsync(Int32 maxItems, Int32 maxBytes, CancellationToken cancellationToken) #Returns:
Task<ValueTuple<String, List<AgentMetricsEnvelope>, Boolean>>Returns the next buffered batch, or an empty list if none are pending.
Parameters
- maxItems System.Int32
- maxBytes System.Int32
- cancellationToken System.Threading.CancellationToken
public async Task EnqueueAsync(AgentMetricsEnvelope payload, CancellationToken cancellationToken) #Returns:
TaskAppends a payload to the buffer.
Parameters
- payload ComputerX.Agent.AgentMetricsEnvelope
- cancellationToken System.Threading.CancellationToken
public async Task<AgentBufferStats> GetStatsAsync(CancellationToken cancellationToken) #Returns:
Task<AgentBufferStats>Returns a snapshot of buffer size and pending file counts.
Parameters
- cancellationToken System.Threading.CancellationToken
public List<String> ListPendingFiles() #Returns:
List<String>Lists pending buffer files in chronological order.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object