mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-07-07 08:36:40 +00:00
5e8152b81c
The s3 and rclone tiered-storage backends were registered via blank imports in weed/storage (volume_tier.go and volume_info/volume_info.go). That forced every library consumer of weed/storage -- weed/shell, and through it external tools -- to link aws-sdk-go and, under the rclone build tag, the full rclone backend set and its cloud-storage SDKs, even though those consumers never tier volumes. Move the registrations into a new weed/storage/backend/all aggregator and blank-import it once from weed/command, the binary's composition root. The weed binary still registers both backends; weed/storage and its library consumers no longer pull the backend SDKs into their dependency graph.
6 lines
233 B
Go
6 lines
233 B
Go
package command
|
|
|
|
// Register the tiered-storage backends here, at the binary's composition root,
|
|
// so library consumers of weed/storage don't pull the backend SDKs.
|
|
import _ "github.com/seaweedfs/seaweedfs/weed/storage/backend/all"
|