LogStreamer
This interface abstracts log fetching from different backends. It provides a method to tail logs, streaming responses back to the client.
Methods
TailLogs()
@classmethod
def TailLogs(
ctx: context.Context,
logContext: *core.LogContext,
stream: *connect.ServerStream[dataproxy.TailLogsResponse]
) - > error
Streams log entries from a specified context. This method allows callers to receive a continuous stream of log data as it becomes available.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the request, used to manage cancellation and deadlines for the log stream. |
| logContext | *core.LogContext | The specific context defining which logs to stream, including source and filtering criteria. |
| stream | *connect.ServerStream[dataproxy.TailLogsResponse] | The server stream to which log tailing responses will be sent, allowing for real-time delivery of log data. |
Returns
| Type | Description |
|---|---|
error | An error if the log tailing operation fails or encounters an issue. |