Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backup ¶
type Backup struct {
BackupOutputDir string
Filename string
BackupDir string
Hot bool
S3Client S3Client
S3Bucket string
Cluster *Cluster
Dockerd *Dockerd
}
Backup compresses and uploads a directory to s3 bucket.
type Cluster ¶
type Cluster struct {
Client DockerClient
}
Cluster represents a cluster of swarm nodes.
func (*Cluster) IsSafeToShutdown ¶
IsSafeToShutdown checks if cluster stays functional after shutting down a manager node.
type ClusterClient ¶
ClusterClient implements DockerClient for cluster operations.
func (*ClusterClient) ManagerList ¶
func (c *ClusterClient) ManagerList(ctx context.Context) ([]*Node, error)
ManagerList returns list of manager nodes.
type Config ¶
type Config struct {
BackupOutputDir string `mapstructure:"backup_output_dir"`
Filename string `mapstructure:"filename"`
BackupDir string `mapstructure:"backup_dir"`
HotBackup bool `mapstructure:"hot_backup"`
S3AccessKeyID string `mapstructure:"s3_access_key_id"`
S3SecretAccessKey string `mapstructure:"s3_secret_access_key"`
S3BucketName string `mapstructure:"s3_bucket"`
S3EndpointUrl string `mapstructure:"s3_endpoint_url"`
}
type Connection ¶
type Connection interface {
StartUnit(ctx context.Context, name string) error
StopUnit(ctx context.Context, name string) error
Status(ctx context.Context, name string) (string, error)
Close()
}
Connection is a connection to systemd's dbus endpoint.
type DbusConnection ¶
DbusConnection implements Connection.
func (*DbusConnection) Close ¶
func (d *DbusConnection) Close()
func (*DbusConnection) StartUnit ¶
func (d *DbusConnection) StartUnit(ctx context.Context, name string) error
StartUnit starts specified unit.
type DockerClient ¶
DockerClient is the API client that performs all operations against a docker server.
type Dockerd ¶
type Dockerd struct {
DbusConn Connection
}
Dockerd manages docker daemon.
type MinIOClient ¶
MinIOClient implements S3Client.
Click to show internal directories.
Click to hide internal directories.