package links
import "github.com/dotcloud/docker/daemon/links"
Index ¶
- func EnvVars(parentIP, childIP, name string, env []string, exposedPorts map[nat.Port]struct{}) []string
- type Link
Functions ¶
func EnvVars ¶
func EnvVars(parentIP, childIP, name string, env []string, exposedPorts map[nat.Port]struct{}) []string
EnvVars generates environment variables for the linked container for the Link with the given options.
Types ¶
type Link ¶
type Link struct {
// Parent container IP address
ParentIP string
// Child container IP address
ChildIP string
// Link name
Name string
// Child environments variables
ChildEnvironment []string
// Child exposed ports
Ports []nat.Port
}
Link struct holds information about parent/child linked container
func NewLink ¶
func NewLink(parentIP, childIP, name string, env []string, exposedPorts map[nat.Port]struct{}) *Link
NewLink initializes a new Link struct with the provided options.
func (*Link) ToEnv ¶
ToEnv creates a string's slice containing child container information in the form of environment variables which will be later exported on container startup.
Source Files ¶
- Version
- v28.5.2+incompatible (latest)
- Published
- Nov 5, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 4 months ago –
Tools for package owners.