Documentation ¶
Index ¶
- func Build(path string) (tag string, err error)
- func Client() (client *docker.Client, err error)
- func CreateNetwork(namespace []string) (networkID string, err error)
- func DeleteNetwork(namespace []string) (err error)
- func FindContainer(namespace []string) (container types.ContainerJSON, err error)
- func FindNetwork(namespace []string) (network types.NetworkResource, err error)
- func FindService(namespace []string) (service swarm.Service, err error)
- func ListServices(label string) (services []swarm.Service, err error)
- func ListTasks(namespace []string) (tasks []swarm.Task, err error)
- func Namespace(ss []string) string
- func ServiceLogs(namespace []string) (reader io.ReadCloser, err error)
- func SharedNetworkID() (networkID string, err error)
- func StartService(options ServiceOptions) (serviceID string, err error)
- func StopService(namespace []string) (err error)
- func TasksError(namespace []string) (errors []string, err error)
- type BuildResponse
- type Mount
- type Port
- type ServiceOptions
- type StatusType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNetwork ¶
CreateNetwork creates a Docker Network with a namespace
func DeleteNetwork ¶
DeleteNetwork deletes a Docker Network associated with a namespace
func FindContainer ¶
func FindContainer(namespace []string) (container types.ContainerJSON, err error)
FindContainer returns a docker container if exist
func FindNetwork ¶
func FindNetwork(namespace []string) (network types.NetworkResource, err error)
FindNetwork finds a Docker Network by a namespace. If no network if found, an error is returned.
func FindService ¶
FindService returns the Docker Service. Return error if not found.
func ListServices ¶
ListServices returns existing docker services matching a specific label name
func ServiceLogs ¶
func ServiceLogs(namespace []string) (reader io.ReadCloser, err error)
ServiceLogs returns the logs of a service
func SharedNetworkID ¶
SharedNetworkID returns the id of the shared network
func StartService ¶
func StartService(options ServiceOptions) (serviceID string, err error)
StartService starts a docker service
func StopService ¶
StopService stops a docker service
func TasksError ¶ added in v1.0.0
TasksError returns the error of matching tasks
Types ¶
type BuildResponse ¶
BuildResponse is the object that is returned by the docker api in json
type ServiceOptions ¶
type ServiceOptions struct { Image string Namespace []string Ports []Port Mounts []Mount Env []string Args []string NetworksID []string Labels map[string]string }
ServiceOptions is a simplify version of swarm.ServiceSpec that can be created it.
type StatusType ¶
type StatusType uint
StatusType of the service
const ( STOPPED StatusType = 0 RUNNING StatusType = 1 )
status for services
func ServiceStatus ¶
func ServiceStatus(namespace []string) (status StatusType, err error)
ServiceStatus return the status of the Docker Swarm Servicer
func Status ¶
func Status(namespace []string) (status StatusType, err error)
Status returns the status of a docker container