Documentation
¶
Overview ¶
Package seaweedfs provides a small client for SeaweedFS's S3-compatible API. It can idempotently initialise a bucket and an optional virtual root prefix, then upload ZIP files with the AWS SDK v2 multipart uploader.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client owns an S3 client and a multipart uploader configured for SeaweedFS.
func New ¶
New creates a SeaweedFS S3 client. It deliberately uses path-style S3 requests, which work reliably for in-cluster SeaweedFS service endpoints.
func (*Client) EnsureInitialRoot ¶
EnsureInitialRoot prepares first-run storage. It is safe to call from multiple application replicas: it creates the bucket when absent and uses an empty .keep object only to make an otherwise-empty root prefix visible.
type Config ¶
type Config struct {
Endpoint string
Region string
AccessKey string
SecretKey string
Bucket string
RootPrefix string
PartSize int64
Concurrency int
}
Config contains the connection and upload settings.
Endpoint example: http://seaweedfs-s3.cmaestro-db.svc.cluster.local:8333 RootPrefix example: root or application-data. It is not a real directory; it becomes a prefix in object keys.