Documentation
¶
Overview ¶
Package s3 is the object-store backend for payload logging: one JSON object per Record. S3-compatible via minio-go, so it targets AWS S3, MinIO, and other compatible stores with the same client. Implements payload.Sink.
This package pulls in the minio-go SDK. It is excluded from the relay "minimal" build (see cmd/relay's build-tagged sink seam), so a minimal binary/image carries none of these deps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Endpoint string // host:port (no scheme), e.g. "s3.amazonaws.com" or "minio.dev-stack:9000"
Bucket string
Region string // optional; AWS uses it, MinIO ignores it
AccessKey string
SecretKey string
Prefix string // key prefix, e.g. "payloads"; trailing slash optional
UseSSL bool
}
Config holds the object-store connection + placement settings.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader is a payload.Reader over the object layout the Sink writes (<prefix>/YYYY/MM/DD/<request_id>.json). Get locates a single object by request-id suffix. There is no List — the Logs list is served by the log store, not the body store.
func NewReader ¶
NewReader constructs a Reader against the same bucket/prefix the Sink targets. It verifies the bucket is reachable.
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
Sink writes each Record as an object at <prefix>/<YYYY>/<MM>/<DD>/<request_id>.json. PutObject is synchronous per call; the emitter's single drain goroutine serializes writes and drop-on-full upstream protects the hot path.