Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidExposedPort = errors.New("invalid exposed port")
Functions ¶
func GetRandomPort ¶
GetRandomPort returns a random (host) port if it finds one.
Types ¶
type ExposedPort ¶
type ExposedPort struct { Proto string HostAddr string HostPort int GuestAddr string GuestPort int }
func ParseExposedPorts ¶
func ParseExposedPorts(exposedPorts map[string]struct{}) ([]ExposedPort, error)
ParseExposedPorts parses the exposed ports listed in an image configuration and returns a list of exposed ports.
If the configuration is invalid, an error will be returned.
func (ExposedPort) String ¶
func (p ExposedPort) String() string
String returns a human-readable representation of an exposed port.
type Slirp4netns ¶
type Slirp4netns struct {
// contains filtered or unexported fields
}
func NewSlirp4netns ¶
func NewSlirp4netns(pid int, socketPath string) (*Slirp4netns, error)
func (*Slirp4netns) ExposePorts ¶
func (s *Slirp4netns) ExposePorts(ports []ExposedPort) error
func (*Slirp4netns) Start ¶
func (s *Slirp4netns) Start() (int, error)
type Slirp4netnsCommand ¶
Click to show internal directories.
Click to hide internal directories.