Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
Upload(ctx context.Context, localPath string) (location string, err error)
}
Backend abstracts where a recording file is stored after capture.
type FileBackend ¶
type FileBackend struct{}
FileBackend is a no-op backend that returns the local path as-is.
type S3Backend ¶
type S3Backend struct {
// contains filtered or unexported fields
}
S3Backend uploads recordings to an S3-compatible store.
func NewS3Backend ¶
NewS3Backend creates an S3Backend from the given config. If AccessKey/SecretKey are set, they are used directly; otherwise credentials are resolved via the standard AWS SDK chain.
func NewS3BackendForTest ¶
func NewS3BackendForTest(ctx context.Context, endpoint, bucket, region, accessKey, secretKey string) (*S3Backend, error)
NewS3BackendForTest creates an S3Backend pointing at a test endpoint with static credentials. Useful for integration tests with MinIO.
func NewS3BackendWithClient ¶
NewS3BackendWithClient creates an S3Backend using a pre-configured S3 client. Useful for testing.
type S3Config ¶
type S3Config struct {
Bucket string
Region string
Endpoint string
Prefix string
AccessKey string // optional; if set, used instead of default credential chain
SecretKey string // optional; must be set together with AccessKey
}
S3Config holds configuration for the S3 storage backend.