Skip to content

feat(server): Add build tags to enable cloud backends#62

Open
mojatter wants to merge 1 commit intomainfrom
feat/server-cloud-backend-tags
Open

feat(server): Add build tags to enable cloud backends#62
mojatter wants to merge 1 commit intomainfrom
feat/server-cloud-backend-tags

Conversation

@mojatter
Copy link
Copy Markdown
Owner

Summary

  • Add server_s3, server_gcs, server_azblob build tags that opt-in cloud backends for s2-server
  • Default build remains osfs/memfs only — official release binaries and Docker images are unchanged
  • Document build tag usage in README (Server Configuration section)

Files

  • server/tag_s3.go//go:build server_s3_ "github.com/mojatter/s2/s3"
  • server/tag_gcs.go//go:build server_gcs_ "github.com/mojatter/s2/gcs"
  • server/tag_azblob.go//go:build server_azblob_ "github.com/mojatter/s2/azblob"

Test plan

  • go build ./server/... passes without tags
  • go build -tags server_s3,server_gcs,server_azblob ./cmd/s2-server/ passes
  • go test ./server/... passes
  • golangci-lint run ./server/... — 0 issues

Add tag_s3.go, tag_gcs.go, tag_azblob.go guarded by server_s3,
server_gcs, server_azblob build tags respectively. The default build
remains osfs/memfs only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant