feat: add options extensions to embed config

Expose S3 option injection in embed gateway config so
integrators can attach request middleware and other
server behaviors without needing to re-implement
RunVersityGW().
This commit is contained in:
Ben McClelland
2026-06-24 08:54:38 -07:00
parent bf8b18839f
commit 6f1dfe84e5
+8
View File
@@ -452,6 +452,11 @@ type Config struct {
// this feature is disabled.
SigHup <-chan struct{}
// S3Options are appended to the internally built s3api options before the
// S3 server is created. This allows callers to inject custom behavior such
// as request middleware.
S3Options []s3api.Option
// Version, Build, and BuildTime are displayed in the startup banner.
// All three are optional; omit or leave empty to suppress the field.
Version string
@@ -619,6 +624,9 @@ func RunVersityGW(ctx context.Context, be backend.Backend, cfg *Config) error {
if cfg.DisableACLs {
opts = append(opts, s3api.WithDisableACL())
}
if len(cfg.S3Options) > 0 {
opts = append(opts, cfg.S3Options...)
}
if cfg.Debug {
debuglogger.SetDebugEnabled()
}