Documentation
¶
Overview ¶
Package naming derives the names Compose uses for the Docker resources it manages.
Index ¶
- func CanonicalContainerName(c container.Summary) string
- func ContainerName(projectName string, service types.ServiceConfig, number int) string
- func ContainerNameWithoutProject(c container.Summary) string
- func DefaultContainerName(projectName, serviceName, index string) string
- func InServices(containers []container.Summary, services []string) []container.Summary
- func LabelFilter(key, value string) string
- func ProjectFilter(projectName string) client.Filters
- func ServiceFilter(serviceName string) string
- func WithoutProjectPrefix(name, projectName, serviceName, number string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonicalContainerName ¶
CanonicalContainerName returns the name a container goes by, without the leading slash nor the link aliases.
func ContainerName ¶
func ContainerName(projectName string, service types.ServiceConfig, number int) string
ContainerName returns the name of the replica of a service: the container_name the service declares, or the default <project>-<service>-<number>.
func ContainerNameWithoutProject ¶
ContainerNameWithoutProject returns the name of a container as Compose displays it: without the project prefix, unless the service declares a custom container_name.
func DefaultContainerName ¶
DefaultContainerName returns the <project>-<service>-<index> name Compose gives a container when the service declares no container_name.
func InServices ¶
InServices keeps the containers of the given services.
func LabelFilter ¶
LabelFilter returns a label filter string of the form "key=value".
func ProjectFilter ¶
ProjectFilter selects the resources of a Compose project.
func ServiceFilter ¶
ServiceFilter returns the label filter selecting the resources of a service.
func WithoutProjectPrefix ¶
WithoutProjectPrefix strips the project prefix from a container name when it is the default name of the replica of the service, and returns it unchanged otherwise.
Types ¶
This section is empty.