seaweedfs

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceName          = "seaweedfs"
	SeaweedFSS3AccessKey = "admin"
	SeaweedFSS3SecretKey = "secret"
)

Variables

View Source
var RequiredPorts = []string{
	"8333/tcp",
}

Functions

This section is empty.

Types

type SeaweedFSDriver

type SeaweedFSDriver struct {
	Buckets []string `json:"buckets"`
	Image   string   `json:"image"`
}

func NewDriver

func NewDriver(image string) *SeaweedFSDriver

Create a new SeaweedFS service driver.

It currently supports SeaweedFS major version 4 (which provides the S3 gateway).

func (*SeaweedFSDriver) AccessKey

func (sd *SeaweedFSDriver) AccessKey() mconfig.EnvironmentValue

Access key accepted by the S3 gateway as an EnvironmentValue for your config.

func (*SeaweedFSDriver) CreateContainer

func (sd *SeaweedFSDriver) CreateContainer(ctx context.Context, c *client.Client, a mconfig.ContainerAllocation) (string, error)

Should create a new container for the service or use the existing one (returns container id + error in case one happened).

func (*SeaweedFSDriver) Endpoint

The full S3 endpoint URL (host:port) as an EnvironmentValue for your config.

func (*SeaweedFSDriver) GetImage

func (sd *SeaweedFSDriver) GetImage() string

func (*SeaweedFSDriver) GetRequiredPorts

func (sd *SeaweedFSDriver) GetRequiredPorts() []string

func (*SeaweedFSDriver) GetUniqueId

func (sd *SeaweedFSDriver) GetUniqueId() string

A unique identifier for the SeaweedFS driver. Appended to the container name to make sure we know it's the container from the driver.

func (*SeaweedFSDriver) HandleInstruction

func (sd *SeaweedFSDriver) HandleInstruction(ctx context.Context, c *client.Client, container mconfig.ContainerInformation, instruction mconfig.Instruction) error

Handles instructions for SeaweedFS.

This will only handle the clear files instruction.

func (*SeaweedFSDriver) Host

Host of the S3 endpoint as an EnvironmentValue for your config.

func (*SeaweedFSDriver) Initialize

func (sd *SeaweedFSDriver) Initialize(ctx context.Context, c *client.Client, container mconfig.ContainerInformation) error

Initialize the container. Creates all of the buckets desired by the user.

func (*SeaweedFSDriver) IsHealthy

func (sd *SeaweedFSDriver) IsHealthy(ctx context.Context, c *client.Client, container mconfig.ContainerInformation) (bool, error)

Check SeaweedFS health by listing the buckets inside the service (with limit of 1).

func (*SeaweedFSDriver) Load

func (sd *SeaweedFSDriver) Load(data string) (mconfig.ServiceDriver, error)

func (*SeaweedFSDriver) NewBucket

func (pd *SeaweedFSDriver) NewBucket(name string) *SeaweedFSDriver

func (*SeaweedFSDriver) Port

Port of the S3 gateway as an EnvironmentValue for your config.

func (*SeaweedFSDriver) Save

func (sd *SeaweedFSDriver) Save() (string, error)

func (*SeaweedFSDriver) SecretKey

func (sd *SeaweedFSDriver) SecretKey() mconfig.EnvironmentValue

Secret key accepted by the S3 gateway as an EnvironmentValue for your config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL