Skip to main content

Module s3_sink

Module s3_sink 

Source
Expand description

S3/R2 Object Storage Sink for Event Streams

Automatically archives JSONL event stream files to S3-compatible storage (AWS S3, Cloudflare R2, MinIO, etc.) for immutable, tamper-proof archival.

This is essential for compliance: SOC 2, FedRAMP, ATO processes require permanent, unmodifiable records of AI agent actions.

§Usage

use codetether_agent::event_stream::s3_sink::S3Sink;

let sink = S3Sink::new(
    "audit-logs-bucket".to_string(),
    "events/".to_string(),
    "https://account-id.r2.cloudflarestorage.com".to_string(),
    "access-key".to_string(),
    "secret-key".to_string(),
).await?;

// Upload event file to S3/R2
sink.upload_file("/local/path/events.jsonl", "session-id").await?;

Structs§

ArchivedEventFile
Event file with S3 archival status
S3Sink
S3/R2 sink for event stream archival
S3SinkConfig
Configuration for S3/R2 sink

Enums§

S3SinkError
Errors that can occur during S3 operations