Documentation ¶
Index ¶
- Constants
- func AddStackLabel(namespace Namespace, labels map[string]string) map[string]string
- func Configs(namespace Namespace, configs map[string]composego.ConfigObjConfig) ([]swarm.ConfigSpec, error)
- func Networks(namespace Namespace, networks composego.Networks, ...) (map[string]types.NetworkCreate, []string)
- func Secrets(namespace Namespace, secrets composego.Secrets) ([]swarm.SecretSpec, error)
- func Service(apiVersion string, namespace Namespace, service composego.ServiceConfig, ...) (swarm.ServiceSpec, error)
- func Services(namespace Namespace, config *composego.Config, client client.CommonAPIClient) (map[string]swarm.ServiceSpec, error)
- func Volumes(serviceVolumes []composego.ServiceVolumeConfig, stackVolumes composego.Volumes, ...) ([]mount.Mount, error)
- type Namespace
- type SwarmFileObject
- type SwarmReferenceObject
- type SwarmReferenceTarget
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]composego.ConfigObjConfig) ([]swarm.ConfigSpec, error)
func Networks ¶
func Networks(namespace Namespace, networks composego.Networks, servicesNetworks map[string]struct{}) (map[string]types.NetworkCreate, []string)
Networks from the compose-file type to the engine API type
func Service ¶
func Service( apiVersion string, namespace Namespace, service composego.ServiceConfig, networkConfigs map[string]composego.NetworkConfig, volumes map[string]composego.VolumeConfig, secrets []*swarm.SecretReference, configs []*swarm.ConfigReference, ) (swarm.ServiceSpec, error)
Service converts a ServiceConfig into a swarm ServiceSpec
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace mangles names by prepending the name
func NewNamespace ¶
NewNamespace returns a new Namespace for scoping of names
type SwarmFileObject ¶
type SwarmFileObject struct { Annotations swarm.Annotations Data []byte }
type SwarmReferenceObject ¶
type SwarmReferenceObject struct { File SwarmReferenceTarget ID string Name string }
Click to show internal directories.
Click to hide internal directories.