Documentation
¶
Index ¶
- Constants
- Variables
- type SeaweedFSDriver
- func (sd *SeaweedFSDriver) AccessKey() mconfig.EnvironmentValue
- func (sd *SeaweedFSDriver) CreateContainer(ctx context.Context, c *client.Client, a mconfig.ContainerAllocation) (string, error)
- func (sd *SeaweedFSDriver) Endpoint(ctx *mconfig.Context) mconfig.EnvironmentValue
- func (sd *SeaweedFSDriver) GetImage() string
- func (sd *SeaweedFSDriver) GetRequiredPorts() []string
- func (sd *SeaweedFSDriver) GetUniqueId() string
- func (sd *SeaweedFSDriver) HandleInstruction(ctx context.Context, c *client.Client, container mconfig.ContainerInformation, ...) error
- func (sd *SeaweedFSDriver) Host(ctx *mconfig.Context) mconfig.EnvironmentValue
- func (sd *SeaweedFSDriver) Initialize(ctx context.Context, c *client.Client, container mconfig.ContainerInformation) error
- func (sd *SeaweedFSDriver) IsHealthy(ctx context.Context, c *client.Client, container mconfig.ContainerInformation) (bool, error)
- func (sd *SeaweedFSDriver) Load(data string) (mconfig.ServiceDriver, error)
- func (pd *SeaweedFSDriver) NewBucket(name string) *SeaweedFSDriver
- func (sd *SeaweedFSDriver) Port(ctx *mconfig.Context) mconfig.EnvironmentValue
- func (sd *SeaweedFSDriver) Save() (string, error)
- func (sd *SeaweedFSDriver) SecretKey() mconfig.EnvironmentValue
Constants ¶
const ( ServiceName = "seaweedfs" SeaweedFSS3AccessKey = "admin" SeaweedFSS3SecretKey = "secret" )
Variables ¶
var RequiredPorts = []string{
"8333/tcp",
}
Functions ¶
This section is empty.
Types ¶
type SeaweedFSDriver ¶
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 ¶
func (sd *SeaweedFSDriver) Endpoint(ctx *mconfig.Context) mconfig.EnvironmentValue
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 ¶
func (sd *SeaweedFSDriver) Host(ctx *mconfig.Context) mconfig.EnvironmentValue
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 ¶
func (sd *SeaweedFSDriver) Port(ctx *mconfig.Context) mconfig.EnvironmentValue
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.