Documentation ¶
Index ¶
- Constants
- func AddStackLabel(namespace Namespace, labels map[string]string) map[string]string
- func Configs(namespace Namespace, configs map[string]composetypes.ConfigObjConfig) ([]swarm.ConfigSpec, error)
- func Networks(namespace Namespace, networks networkMap, servicesNetworks map[string]struct{}) (map[string]types.NetworkCreate, []string)
- func Secrets(namespace Namespace, secrets map[string]composetypes.SecretConfig) ([]swarm.SecretSpec, error)
- func Service(apiVersion string, namespace Namespace, service composetypes.ServiceConfig, ...) (swarm.ServiceSpec, error)
- func Services(namespace Namespace, config *composetypes.Config, ...) (map[string]swarm.ServiceSpec, error)
- func Volumes(serviceVolumes []composetypes.ServiceVolumeConfig, stackVolumes volumes, ...) ([]mount.Mount, error)
- type Namespace
Constants ¶
View Source
const (
// LabelImage is the label used to store image name provided in the compose file
LabelImage = "com.docker.stack.image"
)
View Source
const (
// LabelNamespace is the label used to track stack resources
LabelNamespace = "com.docker.stack.namespace"
)
Variables ¶
This section is empty.
Functions ¶
func AddStackLabel ¶
AddStackLabel returns labels with the namespace label added
func Configs ¶
func Configs(namespace Namespace, configs map[string]composetypes.ConfigObjConfig) ([]swarm.ConfigSpec, error)
Configs converts config objects from the Compose type to the engine API type
func Networks ¶
func Networks(namespace Namespace, networks networkMap, servicesNetworks map[string]struct{}) (map[string]types.NetworkCreate, []string)
Networks from the compose-file type to the engine API type
func Secrets ¶
func Secrets(namespace Namespace, secrets map[string]composetypes.SecretConfig) ([]swarm.SecretSpec, error)
Secrets converts secrets from the Compose type to the engine API type
func Service ¶
func Service( apiVersion string, namespace Namespace, service composetypes.ServiceConfig, networkConfigs map[string]composetypes.NetworkConfig, volumes map[string]composetypes.VolumeConfig, secrets []*swarm.SecretReference, configs []*swarm.ConfigReference, ) (swarm.ServiceSpec, error)
Service converts a ServiceConfig into a swarm ServiceSpec
func Services ¶
func Services( namespace Namespace, config *composetypes.Config, apiClient client.CommonAPIClient, ) (map[string]swarm.ServiceSpec, error)
Services from compose-file types to engine API types
func Volumes ¶
func Volumes(serviceVolumes []composetypes.ServiceVolumeConfig, stackVolumes volumes, namespace Namespace) ([]mount.Mount, error)
Volumes from compose-file types to engine api types
Types ¶
Click to show internal directories.
Click to hide internal directories.