pub trait LogSink:
Send
+ Sync
+ 'static {
// Required methods
fn append(
&self,
chunk: LogChunk,
) -> impl Future<Output = Result<(), LogError>> + Send;
fn get_all(
&self,
workflow_id: &str,
job_id: &str,
) -> impl Future<Output = Result<Vec<LogChunk>, LogError>> + Send;
fn subscribe(&self, workflow_id: &str, job_id: &str) -> Receiver<LogChunk>;
}Expand description
Pluggable log storage and streaming backend.
Workers push log chunks; the server streams them to clients via SSE. Implementations: InMemoryLogSink, FileLogSink, S3LogSink.
Required Methods§
Sourcefn append(
&self,
chunk: LogChunk,
) -> impl Future<Output = Result<(), LogError>> + Send
fn append( &self, chunk: LogChunk, ) -> impl Future<Output = Result<(), LogError>> + Send
Append a log chunk from a worker.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.