docker: Index | Files

package links

import ""


Package Files


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(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 Uses

func (l *Link) ToEnv() []string

ToEnv creates a string's slice containing child container information in the form of environment variables which will be later exported on container startup.

Package links imports 4 packages (graph) and is imported by 491 packages. Updated 2019-12-18. Refresh now. Tools for package owners.