Documentation ¶
Index ¶
- Constants
- func AddMount(slice []mount.Mount, mount mount.Mount) []mount.Mount
- func AttachNetworkMap(alias string, networkID string) *swarm.NetworkAttachmentConfig
- func ComposeService(serviceImage *atqTypes.ServiceImage, globalAlias, alias string, path *string, ...) (*types.ServiceCreateResponse, error)
- func ContainerSpecMapper(serviceImage *atqTypes.ServiceImage, alias string, mounts []mount.Mount) *swarm.ContainerSpec
- func CreateMounts(path *string, alias string) []mount.Mount
- func CreateNetworkMap(alias string) (*swarm.NetworkAttachmentConfig, error)
- func CreateOverlayNetwork(id string) (types.NetworkCreateResponse, error)
- func CreateService(serviceSpec swarm.ServiceSpec) (types.ServiceCreateResponse, error)
- func CreateVolumeWithData(alias, path string) (types.Volume, error)
- func InitDiscoverer(globalAlias string) (*app.AtqService, error)
- func InitService(serviceType string, globalAlias string, service *app.ServicePayload, ...) (*app.AtqService, error)
- func IsSwarmNode() bool
- func NetworkContainers(networkID string) (*map[string]types.EndpointResource, error)
- func NetworkVIPs(networkID string) (*[]string, error)
- func RemoveNetwork(id string) error
- func RemoveService(serviceID string) error
- func RemoveVolume(volumeID string, force bool) error
- func ServiceAttachedNetworkID(serviceID string) (*string, error)
- func ServiceDetails(serviceID string) (*swarm.Service, error)
- func ServiceHostWaiter(serviceID string, replicas int, timeout int) error
- func ServiceModeDefault() *swarm.ServiceMode
- func ServiceVIPS(serviceID string) (*[]swarm.EndpointVirtualIP, error)
- func SwarmInspect() (swarm.Swarm, error)
- func TaskMasterWorker(task *app.TaskPayload, persistance *persistance.Persistance) (*app.AtqTaskFull, error)
- func TaskSpecMapper(containerSpec *swarm.ContainerSpec, ...) *swarm.TaskSpec
- func VIPSWaiter(globalAlias, serviceName string, replicas int, timeout int, service Service, ...) error
- func WorkerHealthchecks(containerID string, replicas int, timeoutSeconds int) error
- type Service
Constants ¶
const GlobalTimeoutSeconds = 60
GlobalTimeoutSeconds specify the predefined timeout for the orchestration processes
Variables ¶
This section is empty.
Functions ¶
func AttachNetworkMap ¶
func AttachNetworkMap(alias string, networkID string) *swarm.NetworkAttachmentConfig
AttachNetworkMap creates a networkAttachmentConfig with the existing specified network
func ComposeService ¶
func ComposeService(serviceImage *atqTypes.ServiceImage, globalAlias, alias string, path *string, mode *swarm.ServiceMode, networkID *string) (*types.ServiceCreateResponse, error)
ComposeService Maps the values to a new service
func ContainerSpecMapper ¶
func ContainerSpecMapper(serviceImage *atqTypes.ServiceImage, alias string, mounts []mount.Mount) *swarm.ContainerSpec
ContainerSpecMapper initializes a new Docker ContainerSpec type with the predefined serviceImage
func CreateMounts ¶
CreateMounts configures the mounts given an alias and a path
func CreateNetworkMap ¶
func CreateNetworkMap(alias string) (*swarm.NetworkAttachmentConfig, error)
CreateNetworkMap creates a new specific network for the service
func CreateOverlayNetwork ¶
func CreateOverlayNetwork(id string) (types.NetworkCreateResponse, error)
CreateOverlayNetwork creates a new Overlay Network in the Swarm
func CreateService ¶
func CreateService(serviceSpec swarm.ServiceSpec) (types.ServiceCreateResponse, error)
CreateService creates a new service in the cluster with the given parameters
func CreateVolumeWithData ¶
CreateVolumeWithData declares a new volume mapped to a given directory
func InitDiscoverer ¶
func InitDiscoverer(globalAlias string) (*app.AtqService, error)
InitDiscoverer deploys dnsrr-discovery API into the Swarm
func InitService ¶
func InitService(serviceType string, globalAlias string, service *app.ServicePayload, networkID *string, persistance *persistance.Persistance) (*app.AtqService, error)
InitService initializes the service
func IsSwarmNode ¶
func IsSwarmNode() bool
IsSwarmNode returns an error if the node is not a swarm node member
func NetworkContainers ¶
func NetworkContainers(networkID string) (*map[string]types.EndpointResource, error)
NetworkContainers returns a list containing all Containers using the network and its Virtual IP
func NetworkVIPs ¶
NetworkVIPs returns the string list containing all Virtual IPs of a given Network
func RemoveNetwork ¶
RemoveNetwork removes specified network from the cluster
func RemoveService ¶
RemoveService deletes the service specified
func RemoveVolume ¶
RemoveVolume removes a given Volume
func ServiceAttachedNetworkID ¶
ServiceAttachedNetworkID finds the network attached to a Service and return its attached netwrok
func ServiceDetails ¶
ServiceDetails return the Service details
func ServiceHostWaiter ¶
ServiceHostWaiter await for a given amount of VIPS specified in the parameter. Timeout in seconds Only for service deployed on the current host
func ServiceModeDefault ¶
func ServiceModeDefault() *swarm.ServiceMode
ServiceModeDefault returns a Replicated Service Mode with 1 replica by default
func ServiceVIPS ¶
func ServiceVIPS(serviceID string) (*[]swarm.EndpointVirtualIP, error)
ServiceVIPS return the list of containers Virtual IPs of the given Service
func SwarmInspect ¶
SwarmInspect gives the information about the Swarm
func TaskMasterWorker ¶
func TaskMasterWorker(task *app.TaskPayload, persistance *persistance.Persistance) (*app.AtqTaskFull, error)
TaskMasterWorker initializes a new Master/Worker Task Type
func TaskSpecMapper ¶
func TaskSpecMapper(containerSpec *swarm.ContainerSpec, networkAttachConfig []swarm.NetworkAttachmentConfig, placement *swarm.Placement) *swarm.TaskSpec
TaskSpecMapper maps the service configuration