Documentation ¶
Index ¶
- Constants
- func ContainerAnnotation(annotations map[string]string, key string, value interface{}) error
- func SetContainerAnnotation(config *models.ContainerCreateConfig, key string, value interface{}) error
- func State(info *models.ContainerInfo) *types.ContainerState
- type ContainerStats
- type ContainerStatsConfig
- type InvalidOrderError
Constants ¶
const ( AnnotationKeyLabels = "docker.labels" AnnotationKeyAutoRemove = "docker.autoremove" )
Variables ¶
This section is empty.
Functions ¶
func ContainerAnnotation ¶
ContainerAnnotation will convert a vSphere annotation into a docker specific attribute
func SetContainerAnnotation ¶
func SetContainerAnnotation(config *models.ContainerCreateConfig, key string, value interface{}) error
SetContainerAnnotation encodes a docker specific attribute into a vSphere annotation. These vSphere annotations are stored in the VM vmx file
func State ¶
func State(info *models.ContainerInfo) *types.ContainerState
State will create and return a docker ContainerState object from the passed vic ContainerInfo object
Types ¶
type ContainerStats ¶
type ContainerStats struct {
// contains filtered or unexported fields
}
ContainerStats encapsulates the conversion of VMMetrics to docker specific metrics
func NewContainerStats ¶
func NewContainerStats(config *ContainerStatsConfig) *ContainerStats
NewContainerStats will return a new instance of ContainerStats
func (*ContainerStats) IsListening ¶
func (cs *ContainerStats) IsListening() bool
IsListening returns the listening flag
func (*ContainerStats) Listen ¶
func (cs *ContainerStats) Listen() *io.PipeWriter
Listen for new metrics from the portLayer, convert to docker format and encode to the configured Writer.
func (*ContainerStats) Stop ¶
func (cs *ContainerStats) Stop()
Stop will clean up the pipe and flip listening flag
func (*ContainerStats) ToContainerStats ¶
func (cs *ContainerStats) ToContainerStats(current *performance.VMMetrics) (*types.StatsJSON, error)
ToContainerStats will convert the vic VMMetrics to a docker stats struct -- a complete docker stats struct requires two samples. Func will return nil until a complete stat is available
type ContainerStatsConfig ¶
type InvalidOrderError ¶
type InvalidOrderError struct {
// contains filtered or unexported fields
}
func (InvalidOrderError) Error ¶
func (iso InvalidOrderError) Error() string