Documentation
¶
Index ¶
- Variables
- func Link(ctx context.Context, projectID, containerID, containerPath string) error
- func Restart(ctx context.Context, projectID, containerID string) error
- func Unlink(ctx context.Context, projectID, containerID string) error
- func Validate(ctx context.Context, projectID, containerID string) (err error)
- type Container
- type ContainerInfo
- type ContainerInfoList
- type Containers
- type Register
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrContainerNotFound happens when a container.json is not found ErrContainerNotFound = errors.New("Container not found") // ErrContainerAlreadyExists happens when a container ID already exists ErrContainerAlreadyExists = errors.New("Container already exists") // ErrInvalidContainerID happens when a container ID is invalid ErrInvalidContainerID = errors.New("Invalid container ID") )
Functions ¶
Types ¶
type Container ¶
type Container struct {
ID string `json:"id"`
Health string `json:"health,omitempty"`
Type string `json:"type,omitempty"`
Hooks *hooks.Hooks `json:"hooks,omitempty"`
Env map[string]string `json:"env,omitempty"`
Scale int `json:"scale,omitempty"`
}
Container structure
type ContainerInfo ¶
ContainerInfo is for a tuple of container ID and Location.
type ContainerInfoList ¶
type ContainerInfoList []ContainerInfo
ContainerInfoList is a list of ContainerInfo
func GetListFromDirectory ¶
func GetListFromDirectory(root string) (ContainerInfoList, error)
GetListFromDirectory returns a list of containers on the given diretory
func (ContainerInfoList) GetIDs ¶
func (c ContainerInfoList) GetIDs() []string
GetIDs returns the containers ids of a given ContainerInfoList.
func (ContainerInfoList) GetLocations ¶
func (c ContainerInfoList) GetLocations() []string
GetLocations returns the locations of a given ContainerInfoList.
type Containers ¶
Containers map
Click to show internal directories.
Click to hide internal directories.