types

package
v0.0.0-...-9050134 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HostsEntry

type HostsEntry struct {
	IP   string `json:"ip"`
	Name string `json:"name"`
}

Hosts defines an entry in the hosts file

func HostsEntryFromString

func HostsEntryFromString(entry string) (HostsEntry, error)

HostsEntryFromString will generate a hostsEntry from a string in IP=NAME format

func (*HostsEntry) GenerateCommandLine

func (hosts *HostsEntry) GenerateCommandLine() []string

GenerateCommandLine generates the command line flags for this mount

type IPAM

type IPAM struct {
	Type   string              `json:"type"`
	Subnet string              `json:"subnet"`
	Routes []map[string]string `json:"routes"`
}

IPAM holds ipam config for a NetworkConfig

type NetworkConfig

type NetworkConfig struct {
	Name      string `json:"name"`
	Type      string `json:"type"`
	Bridge    string `json:"bridge"`
	IsGateway bool   `json:"isGateway"`
	IPMasq    bool   `json:"ipMasq"`
	IPAM      IPAM   `json:"ipam"`
}

NetworkConfig holds the config for a container network

func NewNetworkConfig

func NewNetworkConfig(projectName string) (NetworkConfig, error)

NewNetworkConfig will generate a new network config object for the provided project name

type Volume

type Volume struct {
	Name string      `json:"name"`
	Kind string      `json:"kind"`
	Path string      `json:"path"`
	UID  int         `json:"uid"`
	GID  int         `json:"gid"`
	Mode os.FileMode `json:"mode"`
}

Volume defines the location that mounts will mount from on the host machine

func (*Volume) CreateDir

func (volume *Volume) CreateDir() error

CreateDir creates the directory pointed to in this volume if it does not exist this is only done if the volume.Kind is set to "host".

func (*Volume) GenerateCommandLine

func (volume *Volume) GenerateCommandLine() []string

GenerateCommandLine generates the command line flags for this mount

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL