Documentation
¶
Index ¶
- Variables
- func ContainerTemplates() ([]string, error)
- type Action
- type Container
- type ContainerMetadata
- type ContainerNotFoundError
- type ContainerState
- type ContainerStats
- type CreateAction
- type DestroyAction
- type DiskStats
- type DuplicateContainerIdError
- type FreezeAction
- type HostMonitor
- type HostStats
- type InvalidStateErr
- type Manager
- type MemoryStats
- type StartAction
- type StopAction
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContainerError = ContainerState("Error") ContainerCreating = ContainerState("Creating") ContainerStopping = ContainerState("Stopping") ContainerStopped = ContainerState("Stopped") ContainerStarting = ContainerState("Starting") ContainerRunning = ContainerState("Running") ContainerFreezing = ContainerState("Freezing") ContainerFrozen = ContainerState("Frozen") )
View Source
var Config config
View Source
var Logger logger
Functions ¶
func ContainerTemplates ¶
Types ¶
type Container ¶
type Container struct {
Metadata ContainerMetadata
Stats ContainerStats
// contains filtered or unexported fields
}
func (*Container) ConfigItem ¶
func (*Container) ConfigItems ¶
type ContainerMetadata ¶
type ContainerMetadata struct {
Id uuid.UUID `json:"id"`
Name string `json:"name"`
Hostname string `json:"hostname"`
IPAddresses []net.IP `json:"ip"`
Template string `json:"template"`
AutoStart bool `json:"autostart"`
State ContainerState `json:"state"`
Err error `json:"-"`
}
func NewContainerMetadata ¶
func NewContainerMetadata() ContainerMetadata
func (*ContainerMetadata) IsValid ¶
func (c *ContainerMetadata) IsValid() bool
func (*ContainerMetadata) Validate ¶
func (c *ContainerMetadata) Validate(expression bool, err error)
func (*ContainerMetadata) ValidateHostname ¶
func (c *ContainerMetadata) ValidateHostname()
func (*ContainerMetadata) ValidateName ¶
func (c *ContainerMetadata) ValidateName()
func (*ContainerMetadata) ValidateTemplate ¶
func (c *ContainerMetadata) ValidateTemplate()
type ContainerNotFoundError ¶
type ContainerNotFoundError error
type ContainerState ¶
type ContainerState string
type ContainerStats ¶
type ContainerStats struct {
Cpu float64 `json:"cpu"`
Memory MemoryStats `json:"memory"`
// contains filtered or unexported fields
}
type CreateAction ¶
type CreateAction Action
type DestroyAction ¶
type DestroyAction Action
type DuplicateContainerIdError ¶
type DuplicateContainerIdError error
type FreezeAction ¶
type FreezeAction Action
type HostMonitor ¶
type HostMonitor struct {
// contains filtered or unexported fields
}
func NewHostMonitor ¶
func NewHostMonitor(m *Manager) *HostMonitor
func (*HostMonitor) HostStats ¶
func (m *HostMonitor) HostStats() HostStats
func (*HostMonitor) Start ¶
func (m *HostMonitor) Start()
func (*HostMonitor) Stop ¶
func (m *HostMonitor) Stop()
type InvalidStateErr ¶
type InvalidStateErr error
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) AddContainer ¶
func (*Manager) CreateContainer ¶
func (m *Manager) CreateContainer(metadata ContainerMetadata) error
func (*Manager) DestroyContainer ¶
type MemoryStats ¶
type StartAction ¶
type StartAction Action
type StopAction ¶
type StopAction Action
type ValidationError ¶
type ValidationError error
Click to show internal directories.
Click to hide internal directories.