backends

package
v1.4.3-dev Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2018 License: Apache-2.0 Imports: 92 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PortlayerName = "Backend Engine"

	// RetryTimeSeconds defines how many seconds to wait between retries
	RetryTimeSeconds = 2

	APITimeout = constants.PropertyCollectorTimeout + 3*time.Second
)
View Source
const (

	// MemoryAlignMB is the value to which container VM memory must align in order for hotadd to work
	MemoryAlignMB = 128
	// MemoryMinMB - the minimum allowable container memory size
	MemoryMinMB = 512
	// MemoryDefaultMB - the default container VM memory size
	MemoryDefaultMB = 2048
	// MinCPUs - the minimum number of allowable CPUs the container can use
	MinCPUs = 1
	// DefaultCPUs - the default number of container VM CPUs
	DefaultCPUs = 2
	// Default timeout to stop a container if not specified in container config
	DefaultStopTimeout = 10
)
View Source
const (
	RunningState   = "Running"
	CreatedState   = "Created"
	SuspendedState = "Suspended"
	StartingState  = "Starting"
	StoppedState   = "Stopped"
)

These are the constants used for the portlayer exec states checks returned when obtaining the state of a container handle

Variables

View Source
var (
	RegistryCertPool *x509.CertPool
)

Functions

func CreateContainerEventActorWithAttributes

func CreateContainerEventActorWithAttributes(vc *viccontainer.VicContainer, attributes map[string]string) eventtypes.Actor

func CreateImageEventActorWithAttributes

func CreateImageEventActorWithAttributes(imageID, refName string, attributes map[string]string) eventtypes.Actor

func EventService

func EventService() *events.Events

func FetchVolumeStores

func FetchVolumeStores(client *client.PortLayer) (string, error)

func Init

func Init(portLayerAddr, product string, port uint, config *config.VirtualContainerHostConfigSpec) error

func NewVolumeModel

func NewVolumeModel(volume *models.VolumeResponse, labels map[string]string) *types.Volume

func PortLayerClient

func PortLayerClient() *apiclient.PortLayer

func PortLayerName

func PortLayerName() string

func PortLayerServer

func PortLayerServer() string

func ProductName

func ProductName() string

func ProductVersion

func ProductVersion() string

Types

type ArchiveReader

type ArchiveReader struct {
	// contains filtered or unexported fields
}

type ArchiveStreamReaderMap

type ArchiveStreamReaderMap struct {
	// contains filtered or unexported fields
}

func NewArchiveStreamReaderMap

func NewArchiveStreamReaderMap(op trace.Operation, mounts []types.MountPoint, dest string) *ArchiveStreamReaderMap

NewArchiveStreamReaderMap creates a new ArchiveStreamReaderMap. After the call, it contains information to create readers for every volume mounts for the container

mounts is the mount data from inspect

func (*ArchiveStreamReaderMap) Close

func (rm *ArchiveStreamReaderMap) Close()

Close visits all the archive readers in the trie and closes the actual io.ReadCloser

func (*ArchiveStreamReaderMap) FindArchiveReaders

func (rm *ArchiveStreamReaderMap) FindArchiveReaders(containerSourcePath string) ([]*ArchiveReader, error)

FindArchiveReaders finds all archive readers that are within the container source path. For example,

mount A -			/mnt/A
mount B -			/mnt/B
mount AB -			/mnt/A/AB
base container -	/

container source path - /mnt/A

For the above example, this function returns the readers for mount A and mount AB but not the readers for / or mount B.

func (*ArchiveStreamReaderMap) ReadersForSourcePath

func (rm *ArchiveStreamReaderMap) ReadersForSourcePath(proxy proxy.VicArchiveProxy, cid, containerSourcePath string) ([]io.ReadCloser, error)

ReadersForSourcePath returns all an array of io.Reader for all the readers within a container source path.

Example:
	Reader 1 -				/mnt/A
	Reader 2 -				/mnt/A/B

	containerSourcePath -	/mnt/A

In the above, both readers are within the the container source path.

type ArchiveStreamWriterMap

type ArchiveStreamWriterMap struct {
	// contains filtered or unexported fields
}

ArchiveStreamWriterMap maps mount prefix to io.WriteCloser

func NewArchiveStreamWriterMap

func NewArchiveStreamWriterMap(op trace.Operation, mounts []types.MountPoint, dest string) *ArchiveStreamWriterMap

NewArchiveStreamWriterMap creates a new ArchiveStreamWriterMap. The map contains all information needed to create a writers for every volume mounts for the container. This includes the root volume of the container.

mounts is the mount data from inspect containerDestPath is the destination path in the container

func (*ArchiveStreamWriterMap) Close

Close visits all the archive writer in the trie and closes the actual io.WritCloser

func (*ArchiveStreamWriterMap) FindArchiveWriter

func (wm *ArchiveStreamWriterMap) FindArchiveWriter(containerDestPath, assetName string) (*ArchiveWriter, error)

FindArchiveWriter finds the one writer that matches the asset name. There should only be one stream this asset needs to be written to.

func (*ArchiveStreamWriterMap) WriterForAsset

func (wm *ArchiveStreamWriterMap) WriterForAsset(proxy proxy.VicArchiveProxy, cid, containerDestPath string, assetHeader tar.Header) (*tar.Writer, error)

WriterForAsset takes a destination path and subpath of the archive data and returns the appropriate writer for the two. It's intention is to solve the case where there exist a mount point and another mount point within the first mount point. For instance, the prefix map can have,

R/W -					/
mount 1 -				/mnt/a
mount 2 -				/mnt/a/b

case 1:
		containerDestPath -			/mnt/a
		archive header source -		b/file.txt

	The correct writer would be the one corresponding to mount 2.

case 2:
		containerDestPath -			/mnt/a
		archive header source -		file.txt

	The correct writer would be the one corresponding to mount 1.

case 3:
		containerDestPath -			/
		archive header source -		mnt/a/file.txt

	The correct writer would be the one corresponding to mount 1

As demonstrated above, the mount prefix and writer cannot be determined with just the container destination path. It must be combined with the actual asset's name.

type ArchiveWriter

type ArchiveWriter struct {
	// contains filtered or unexported fields
}

type Builder

type Builder struct {
}

func (*Builder) BuildFromContext

func (b *Builder) BuildFromContext(ctx context.Context, src io.ReadCloser, remote string, buildOptions *types.ImageBuildOptions, pg backend.ProgressWriter) (string, error)

type CheckpointBackend

type CheckpointBackend struct {
}

func NewCheckpointBackend

func NewCheckpointBackend() *CheckpointBackend

func (*CheckpointBackend) CheckpointCreate

func (c *CheckpointBackend) CheckpointCreate(container string, config types.CheckpointCreateOptions) error

func (*CheckpointBackend) CheckpointDelete

func (c *CheckpointBackend) CheckpointDelete(container string, config types.CheckpointDeleteOptions) error

func (*CheckpointBackend) CheckpointList

func (c *CheckpointBackend) CheckpointList(container string, config types.CheckpointListOptions) ([]types.Checkpoint, error)

type ContainerBackend

type ContainerBackend struct {
	// contains filtered or unexported fields
}

Container struct represents the Container

func NewContainerBackend

func NewContainerBackend() *ContainerBackend

NewContainerBackend will create a new containerEngine or return the existing

func (*ContainerBackend) ContainerArchivePath

func (c *ContainerBackend) ContainerArchivePath(name string, path string) (io.ReadCloser, *types.ContainerPathStat, error)

ContainerArchivePath creates an archive of the filesystem resource at the specified path in the container identified by the given name. Returns a tar archive of the resource and whether it was a directory or a single file.

func (*ContainerBackend) ContainerAttach

func (c *ContainerBackend) ContainerAttach(name string, ca *backend.ContainerAttachConfig) error

ContainerAttach attaches to logs according to the config passed in. See ContainerAttachConfig.

func (*ContainerBackend) ContainerChanges

func (c *ContainerBackend) ContainerChanges(name string) ([]docker.Change, error)

ContainerChanges returns a list of container fs changes

func (*ContainerBackend) ContainerCopy

func (c *ContainerBackend) ContainerCopy(name string, res string) (io.ReadCloser, error)

ContainerCopy performs a deprecated operation of archiving the resource at the specified path in the container identified by the given name.

func (*ContainerBackend) ContainerCreate

ContainerCreate creates a container.

func (*ContainerBackend) ContainerExecCreate

func (c *ContainerBackend) ContainerExecCreate(name string, config *types.ExecConfig) (string, error)

ContainerExecCreate sets up an exec in a running container.

func (*ContainerBackend) ContainerExecInspect

func (c *ContainerBackend) ContainerExecInspect(eid string) (*backend.ExecInspect, error)

ContainerExecInspect returns low-level information about the exec command. An error is returned if the exec cannot be found.

func (*ContainerBackend) ContainerExecResize

func (c *ContainerBackend) ContainerExecResize(eid string, height, width int) error

ContainerExecResize changes the size of the TTY of the process running in the exec with the given name to the given height and width.

func (*ContainerBackend) ContainerExecStart

func (c *ContainerBackend) ContainerExecStart(ctx context.Context, eid string, stdin io.ReadCloser, stdout, stderr io.Writer) error

ContainerExecStart starts a previously set up exec instance. The std streams are set up.

func (*ContainerBackend) ContainerExport

func (c *ContainerBackend) ContainerExport(name string, out io.Writer) error

ContainerExport writes the contents of the container to the given writer. An error is returned if the container cannot be found.

func (*ContainerBackend) ContainerExtractToDir

func (c *ContainerBackend) ContainerExtractToDir(name, path string, noOverwriteDirNonDir bool, content io.Reader) error

ContainerExtractToDir extracts the given archive to the specified location in the filesystem of the container identified by the given name. The given path must be of a directory in the container. If it is not, the error will be ErrExtractPointNotDirectory. If noOverwriteDirNonDir is true then it will be an error if unpacking the given content would cause an existing directory to be replaced with a non-directory and vice versa.

func (*ContainerBackend) ContainerInspect

func (c *ContainerBackend) ContainerInspect(name string, size bool, version string) (interface{}, error)

ContainerInspect returns low-level information about a container. Returns an error if the container cannot be found, or if there is an error getting the data.

func (*ContainerBackend) ContainerKill

func (c *ContainerBackend) ContainerKill(name string, sig uint64) error

ContainerKill sends signal to the container If no signal is given (sig 0), then Kill with SIGKILL and wait for the container to exit. If a signal is given, then just send it to the container and return.

func (*ContainerBackend) ContainerLogs

func (c *ContainerBackend) ContainerLogs(ctx context.Context, name string, config *backend.ContainerLogsConfig, started chan struct{}) error

ContainerLogs hooks up a container's stdout and stderr streams configured with the given struct.

func (*ContainerBackend) ContainerPause

func (c *ContainerBackend) ContainerPause(name string) error

ContainerPause pauses a container

func (*ContainerBackend) ContainerRename

func (c *ContainerBackend) ContainerRename(oldName, newName string) error

ContainerRename changes the name of a container, using the oldName to find the container. An error is returned if newName is already reserved.

func (*ContainerBackend) ContainerResize

func (c *ContainerBackend) ContainerResize(name string, height, width int) error

ContainerResize changes the size of the TTY of the process running in the container with the given name to the given height and width.

func (*ContainerBackend) ContainerRestart

func (c *ContainerBackend) ContainerRestart(name string, seconds *int) error

ContainerRestart stops and starts a container. It attempts to gracefully stop the container within the given timeout, forcefully stopping it if the timeout is exceeded. If given a negative timeout, ContainerRestart will wait forever until a graceful stop. Returns an error if the container cannot be found, or if there is an underlying error at any stage of the restart.

func (*ContainerBackend) ContainerRm

func (c *ContainerBackend) ContainerRm(name string, config *types.ContainerRmConfig) error

ContainerRm removes the container id from the filesystem. An error is returned if the container is not found, or if the remove fails. If the remove succeeds, the container name is released, and vicnetwork links are removed.

func (*ContainerBackend) ContainerStart

func (c *ContainerBackend) ContainerStart(name string, hostConfig *containertypes.HostConfig, checkpoint string, checkpointDir string) error

ContainerStart starts a container.

func (*ContainerBackend) ContainerStatPath

func (c *ContainerBackend) ContainerStatPath(name string, path string) (stat *types.ContainerPathStat, err error)

ContainerStatPath stats the filesystem resource at the specified path in the container identified by the given name.

func (*ContainerBackend) ContainerStats

func (c *ContainerBackend) ContainerStats(ctx context.Context, name string, config *backend.ContainerStatsConfig) error

ContainerStats writes information about the container to the stream given in the config object.

func (*ContainerBackend) ContainerStop

func (c *ContainerBackend) ContainerStop(name string, seconds *int) error

ContainerStop looks for the given container and terminates it, waiting the given number of seconds before forcefully killing the container. If a negative number of seconds is given, ContainerStop will wait for a graceful termination. An error is returned if the container is not found, is already stopped, or if there is a problem stopping the container.

func (*ContainerBackend) ContainerTop

func (c *ContainerBackend) ContainerTop(name string, psArgs string) (*types.ContainerProcessList, error)

ContainerTop lists the processes running inside of the given container by calling ps with the given args, or with the flags "-ef" if no args are given. An error is returned if the container is not found, or is not running, or if there are any problems running ps, or parsing the output.

func (*ContainerBackend) ContainerUnpause

func (c *ContainerBackend) ContainerUnpause(name string) error

ContainerUnpause unpauses a container

func (*ContainerBackend) ContainerUpdate

ContainerUpdate updates configuration of the container

func (*ContainerBackend) ContainerWait

func (c *ContainerBackend) ContainerWait(name string, timeout time.Duration) (int, error)

ContainerWait stops processing until the given container is stopped. If the container is not found, an error is returned. On a successful stop, the exit code of the container is returned. On a timeout, an error is returned. If you want to wait forever, supply a negative duration for the timeout.

func (*ContainerBackend) Containers

func (c *ContainerBackend) Containers(config *types.ContainerListOptions) ([]*types.Container, error)

Containers returns the list of containers to show given the user's filtering.

func (*ContainerBackend) ContainersPrune

func (c *ContainerBackend) ContainersPrune(pruneFilters filters.Args) (*types.ContainersPruneReport, error)

func (*ContainerBackend) ExecExists

func (c *ContainerBackend) ExecExists(eid string) (bool, error)

ExecExists looks up the exec instance and returns a bool if it exists or not. It will also return the error produced by `getConfig`

func (*ContainerBackend) GetContainerChanges

func (c *ContainerBackend) GetContainerChanges(op trace.Operation, vc *viccontainer.VicContainer, data bool) (io.ReadCloser, error)

GetContainerChanges returns container changes from portlayer. Set data to true will return file data, otherwise, only return file headers with change type.

func (*ContainerBackend) Handle

func (c *ContainerBackend) Handle(id, name string) (string, error)

type DockerEventPublisher

type DockerEventPublisher struct {
}

func (DockerEventPublisher) PublishEvent

func (p DockerEventPublisher) PublishEvent(event plevents.BaseEvent)

PublishEvent translates select portlayer container events into Docker events and publishes to subscribers

type ImageBackend

type ImageBackend struct {
}

func NewImageBackend

func NewImageBackend() *ImageBackend

func (*ImageBackend) Commit

func (i *ImageBackend) Commit(name string, config *backend.ContainerCommitConfig) (imageID string, err error)

Commit creates a new filesystem image from the current state of a container. The image can optionally be tagged into a repository.

func (*ImageBackend) Exists

func (i *ImageBackend) Exists(containerName string) bool

func (*ImageBackend) ExportImage

func (i *ImageBackend) ExportImage(names []string, outStream io.Writer) error

func (*ImageBackend) ImageDelete

func (i *ImageBackend) ImageDelete(imageRef string, force, prune bool) ([]types.ImageDelete, error)

TODO fix the errors so the client doesnt print the generic POST or DELETE message

func (*ImageBackend) ImageHistory

func (i *ImageBackend) ImageHistory(imageName string) ([]*types.ImageHistory, error)

func (*ImageBackend) Images

func (i *ImageBackend) Images(imageFilters filters.Args, all bool, withExtraAttrs bool) ([]*types.ImageSummary, error)

func (*ImageBackend) ImagesPrune

func (i *ImageBackend) ImagesPrune(pruneFilters filters.Args) (*types.ImagesPruneReport, error)

func (*ImageBackend) ImportImage

func (i *ImageBackend) ImportImage(src string, repository, tag string, msg string, inConfig io.ReadCloser, outStream io.Writer, changes []string) error

func (*ImageBackend) LoadImage

func (i *ImageBackend) LoadImage(inTar io.ReadCloser, outStream io.Writer, quiet bool) error

func (*ImageBackend) LookupImage

func (i *ImageBackend) LookupImage(name string) (*types.ImageInspect, error)

Docker Inspect. LookupImage looks up an image by name and returns it as an ImageInspect structure.

func (*ImageBackend) PullImage

func (i *ImageBackend) PullImage(ctx context.Context, image, tag string, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error

func (*ImageBackend) PushImage

func (i *ImageBackend) PushImage(ctx context.Context, image, tag string, metaHeaders map[string][]string, authConfig *types.AuthConfig, outStream io.Writer) error

func (*ImageBackend) SearchRegistryForImages

func (i *ImageBackend) SearchRegistryForImages(ctx context.Context, filtersArgs string, term string, limit int, authConfig *types.AuthConfig, metaHeaders map[string][]string) (*registry.SearchResults, error)

func (*ImageBackend) TagImage

func (i *ImageBackend) TagImage(imageName, repository, tag string) error

type NetworkBackend

type NetworkBackend struct {
}

func NewNetworkBackend

func NewNetworkBackend() *NetworkBackend

func (*NetworkBackend) ConnectContainerToNetwork

func (n *NetworkBackend) ConnectContainerToNetwork(containerName, networkName string, endpointConfig *apinet.EndpointSettings) error

ConnectContainerToNetwork connects a container to a container vicnetwork. It wraps the portlayer operations in a retry for when there's a conflict error received, such as one during a similar concurrent operation.

func (*NetworkBackend) CreateNetwork

func (*NetworkBackend) DeleteNetwork

func (n *NetworkBackend) DeleteNetwork(name string) error

func (*NetworkBackend) DisconnectContainerFromNetwork

func (n *NetworkBackend) DisconnectContainerFromNetwork(containerName string, networkName string, force bool) error

func (*NetworkBackend) FindNetwork

func (n *NetworkBackend) FindNetwork(idName string) (libnetwork.Network, error)

func (*NetworkBackend) GetNetworkByName

func (n *NetworkBackend) GetNetworkByName(idName string) (libnetwork.Network, error)

func (*NetworkBackend) GetNetworks

func (n *NetworkBackend) GetNetworks() []libnetwork.Network

func (*NetworkBackend) GetNetworksByID

func (n *NetworkBackend) GetNetworksByID(partialID string) []libnetwork.Network

func (*NetworkBackend) NetworkControllerEnabled

func (n *NetworkBackend) NetworkControllerEnabled() bool

func (*NetworkBackend) NetworksPrune

func (n *NetworkBackend) NetworksPrune(pruneFilters filters.Args) (*types.NetworksPruneReport, error)

type PlEventProxy

type PlEventProxy struct {
}

func (PlEventProxy) StreamEvents

func (ep PlEventProxy) StreamEvents(ctx context.Context, out io.Writer) error

StreamEvents() handles all swagger interaction to the Portlayer's event manager

Input:

context and a io.Writer

type PluginBackend

type PluginBackend struct {
}

func NewPluginBackend

func NewPluginBackend() *PluginBackend

func (*PluginBackend) CreateFromContext

func (p *PluginBackend) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *enginetypes.PluginCreateOptions) error

func (*PluginBackend) Disable

func (p *PluginBackend) Disable(name string, config *enginetypes.PluginDisableConfig) error

func (*PluginBackend) Enable

func (p *PluginBackend) Enable(name string, config *enginetypes.PluginEnableConfig) error

func (*PluginBackend) Inspect

func (p *PluginBackend) Inspect(name string) (*enginetypes.Plugin, error)

func (*PluginBackend) List

func (p *PluginBackend) List() ([]enginetypes.Plugin, error)

func (*PluginBackend) Privileges

func (p *PluginBackend) Privileges(ctx context.Context, ref reference.Named, metaHeaders http.Header, authConfig *enginetypes.AuthConfig) (enginetypes.PluginPrivileges, error)

func (*PluginBackend) Pull

func (p *PluginBackend) Pull(ctx context.Context, ref reference.Named, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, privileges enginetypes.PluginPrivileges, outStream io.Writer) error

func (*PluginBackend) Push

func (p *PluginBackend) Push(ctx context.Context, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, outStream io.Writer) error

func (*PluginBackend) Remove

func (p *PluginBackend) Remove(name string, config *enginetypes.PluginRmConfig) error

func (*PluginBackend) Set

func (p *PluginBackend) Set(name string, args []string) error

type PortlayerEventMonitor

type PortlayerEventMonitor struct {
	// contains filtered or unexported fields
}

func NewPortlayerEventMonitor

func NewPortlayerEventMonitor(proxy eventproxy, publisher eventpublisher) *PortlayerEventMonitor

func (*PortlayerEventMonitor) Start

func (m *PortlayerEventMonitor) Start() error

Start() starts the portlayer event monitoring

func (*PortlayerEventMonitor) Stop

func (m *PortlayerEventMonitor) Stop()

Stop() stops the portlayer event monitoring

type SwarmBackend

type SwarmBackend struct {
}

func NewSwarmBackend

func NewSwarmBackend() *SwarmBackend

func (*SwarmBackend) CreateSecret

func (s *SwarmBackend) CreateSecret(sp types.SecretSpec) (string, error)

func (*SwarmBackend) CreateService

func (*SwarmBackend) GetNode

func (s *SwarmBackend) GetNode(string) (types.Node, error)

func (*SwarmBackend) GetNodes

func (*SwarmBackend) GetSecret

func (s *SwarmBackend) GetSecret(id string) (types.Secret, error)

func (*SwarmBackend) GetSecrets

func (s *SwarmBackend) GetSecrets(opts basictypes.SecretListOptions) ([]types.Secret, error)

func (*SwarmBackend) GetService

func (s *SwarmBackend) GetService(string) (types.Service, error)

func (*SwarmBackend) GetServices

func (*SwarmBackend) GetTask

func (s *SwarmBackend) GetTask(string) (types.Task, error)

func (*SwarmBackend) GetTasks

func (*SwarmBackend) GetUnlockKey

func (s *SwarmBackend) GetUnlockKey() (string, error)

func (*SwarmBackend) Init

func (s *SwarmBackend) Init(req types.InitRequest) (string, error)

func (*SwarmBackend) Inspect

func (s *SwarmBackend) Inspect() (types.Swarm, error)

func (*SwarmBackend) Join

func (s *SwarmBackend) Join(req types.JoinRequest) error

func (*SwarmBackend) Leave

func (s *SwarmBackend) Leave(force bool) error

func (*SwarmBackend) RemoveNode

func (s *SwarmBackend) RemoveNode(string, bool) error

func (*SwarmBackend) RemoveSecret

func (s *SwarmBackend) RemoveSecret(id string) error

func (*SwarmBackend) RemoveService

func (s *SwarmBackend) RemoveService(string) error

func (*SwarmBackend) ServiceLogs

func (s *SwarmBackend) ServiceLogs(context.Context, string, *backend.ContainerLogsConfig, chan struct{}) error

func (*SwarmBackend) UnlockSwarm

func (s *SwarmBackend) UnlockSwarm(req types.UnlockRequest) error

func (*SwarmBackend) Update

func (*SwarmBackend) UpdateNode

func (s *SwarmBackend) UpdateNode(string, uint64, types.NodeSpec) error

func (*SwarmBackend) UpdateSecret

func (s *SwarmBackend) UpdateSecret(id string, version uint64, spec types.SecretSpec) error

type SystemBackend

type SystemBackend struct {
	// contains filtered or unexported fields
}

func NewSystemBackend

func NewSystemBackend() *SystemBackend

func (*SystemBackend) AuthenticateToRegistry

func (s *SystemBackend) AuthenticateToRegistry(ctx context.Context, authConfig *types.AuthConfig) (string, string, error)

AuthenticateToRegistry handles docker logins

func (*SystemBackend) SubscribeToEvents

func (s *SystemBackend) SubscribeToEvents(since, until time.Time, filter filters.Args) ([]eventtypes.Message, chan interface{})

func (*SystemBackend) SystemCPUMhzLimit

func (s *SystemBackend) SystemCPUMhzLimit() (int64, error)

SystemCPUMhzLimit will return the VCH configured Mhz limit

func (*SystemBackend) SystemDiskUsage

func (s *SystemBackend) SystemDiskUsage() (*types.DiskUsage, error)

func (*SystemBackend) SystemInfo

func (s *SystemBackend) SystemInfo() (*types.Info, error)

func (*SystemBackend) SystemVersion

func (s *SystemBackend) SystemVersion() types.Version

func (*SystemBackend) UnsubscribeFromEvents

func (s *SystemBackend) UnsubscribeFromEvents(listener chan interface{})

type VolumeBackend

type VolumeBackend struct {
	// contains filtered or unexported fields
}

Volume which defines the docker personalities view of a Volume

func NewVolumeBackend

func NewVolumeBackend() *VolumeBackend

func (*VolumeBackend) VolumeCreate

func (v *VolumeBackend) VolumeCreate(name, driverName string, volumeData, labels map[string]string) (*types.Volume, error)

VolumeCreate : docker personality implementation for VIC

func (*VolumeBackend) VolumeInspect

func (v *VolumeBackend) VolumeInspect(name string) (*types.Volume, error)

VolumeInspect : docker personality implementation for VIC

func (*VolumeBackend) VolumeRm

func (v *VolumeBackend) VolumeRm(name string, force bool) error

VolumeRm : docker personality for VIC

func (*VolumeBackend) Volumes

func (v *VolumeBackend) Volumes(filter string) ([]*types.Volume, []string, error)

Volumes docker personality implementation for VIC

func (*VolumeBackend) VolumesPrune

func (v *VolumeBackend) VolumesPrune(pruneFilters filters.Args) (*types.VolumesPruneReport, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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