Documentation
¶
Index ¶
- Constants
- Variables
- func DeleteCluster(ctx context.Context, c *client.Client, opts *RequestOptions) error
- func EnsureSwarmExists(ctx context.Context, c *client.Client, opts *RequestOptions) error
- func InfoCluster(ctx context.Context, c *client.Client) (swarm.Swarm, error)
- func InfoNode(ctx context.Context, c *client.Client) (swarm.Node, error)
- func InfoToJSON(sw swarm.Swarm, node swarm.Node) (string, error)
- func LabelNode(ctx context.Context, c *client.Client, opts *RequestOptions) error
- func RunAgent(ctx context.Context, c *client.Client, action string, opts *RequestOptions) error
- type FullSwarmInfo
- type RequestOptions
- type ShortSwarmInfo
Constants ¶
View Source
const ( InitTimeout = 10 ContainerName = "ampagent" ImageName = "appcelerator/ampagent" DockerSocket = "/var/run/docker.sock" DockerSwarmSocket = "/var/run/docker" )
Variables ¶
View Source
var (
ContainerLabels = map[string]string{"io.amp.role": "infrastructure"}
)
Functions ¶
func DeleteCluster ¶
DeleteSwarm starts the delete operation
func EnsureSwarmExists ¶
EnsureSwarmExists checks that the Swarm is initialized, and does it if it's not the case
func InfoCluster ¶
InfoCluster returns the Swarm info
Types ¶
type RequestOptions ¶
type RequestOptions struct {
InitRequest swarm.InitRequest
// Node labels
Labels map[string]string
// Tag of the ampagent image
Tag string
Registration string
Notifications bool
ForceLeave bool
SkipTests bool
NoMonitoring bool
}
RequestOptions stores parameters for the Docker API
type ShortSwarmInfo ¶
Click to show internal directories.
Click to hide internal directories.