Documentation
¶
Overview ¶
Packager dockercntrl gives limited nebula-specific control to the docker deamon. It's structures can be used to pass containers via JSON.
Index ¶
- Constants
- type Config
- type Container
- type IpInfo
- type Limits
- type Network
- type State
- func (s *State) AttachContainerNetwork(container *Container, network *Network) error
- func (s *State) AttachNetwork(container_name string, network string) error
- func (s *State) BeaconCreateOverlay(containerName string, overlayName string) (string, string, error)
- func (s *State) BeaconCreateSpinnerOverlay(overlayName string) error
- func (s *State) Create(configuration *Config) (*Container, error)
- func (s *State) CreateOverlay(name string) (int, error)
- func (s *State) CreateSwarm(myIp string) (int, error)
- func (s *State) GetNetwork() (*Network, error)
- func (s *State) GetSwarmInfo() (int, *SwarmInfo, error)
- func (s *State) JoinOverlay(containerName, overlayName string) error
- func (s *State) JoinSwarm(myIp, token, managerIp string) (int, error)
- func (s *State) JoinSwarmAndOverlay(token string, ip string, containerName, overlayName string) error
- func (s *State) Kill(cont *Container) error
- func (s *State) List() ([]*Container, error)
- func (s *State) NetworkConnect(container *Container) error
- func (s *State) NetworkCreate() (Network, error)
- func (s *State) NetworkList() ([]Network, error)
- func (s *State) Pull(config *Config) (*string, error)
- func (s *State) Remove(cont *Container) error
- func (s *State) Run(c *Container) (*string, error)
- func (s *State) VolumeCreate(name string) error
- type SwarmInfo
Constants ¶
View Source
const (
LABEL = "nebula-id"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Id *uuid.UUID `json:"nebula_id,omitempty"` Image string `json:"image"` Cmd []string `json:"command"` Tty bool `json:"tty"` Name string `json:"name"` Limits *Limits `json:"limits"` Env []string `json:"env"` Port int `json:"port"` Storage bool `json:"storage"` // contains filtered or unexported fields }
Config represents the configuration to build a new container.
func (*Config) AddDeamonMount ¶
func (c *Config) AddDeamonMount()
type Container ¶
type Container struct { ID string `json:"Id"` State *State Names []string Configuration *Config Image string Command string }
Container holds the data required to identify and adjust a docker container.
type State ¶
type State struct { Context context.Context Client *client.Client // TODO: switch to sdk HttpUnix *http.Client }
State holds the structs required to manipulate the docker daemon
func (*State) AttachContainerNetwork ¶
func (*State) AttachNetwork ¶
revised version api request
func (*State) BeaconCreateOverlay ¶
func (s *State) BeaconCreateOverlay(containerName string, overlayName string) (string, string, error)
Beacon create overlay network
Input: containerName overlayName Return: token, beacon_ip, error
func (*State) CreateOverlay ¶
create overlay network
func (*State) CreateSwarm ¶
initialize the swarm
func (*State) GetNetwork ¶
func (*State) JoinOverlay ¶
join the overlay (already join the swarm)
func (*State) JoinSwarmAndOverlay ¶
func (s *State) JoinSwarmAndOverlay(token string, ip string, containerName, overlayName string) error
Captain/Spinner join the overlay network join the swarm first given target token, ip, overlay name and self_container_name
func (*State) NetworkConnect ¶
func (*State) NetworkCreate ¶
func (*State) NetworkList ¶
Click to show internal directories.
Click to hide internal directories.