providers

package
v0.0.0-...-a58d3e8 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: Apache-2.0 Imports: 2 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	GetConfig() ProviderConfig
	//Images
	Stage(params types.StageImageParams) (*types.Image, error)
	ListImages() ([]*types.Image, error)
	GetImage(nameOrIdPrefix string) (*types.Image, error)
	DeleteImage(id string, force bool) error
	//Instances
	RunInstance(params types.RunInstanceParams) (*types.Instance, error)
	ListInstances() ([]*types.Instance, error)
	GetInstance(nameOrIdPrefix string) (*types.Instance, error)
	DeleteInstance(id string, force bool) error
	StartInstance(id string) error
	StopInstance(id string) error
	GetInstanceLogs(id string) (string, error)
	//Volumes
	CreateVolume(params types.CreateVolumeParams) (*types.Volume, error)
	ListVolumes() ([]*types.Volume, error)
	GetVolume(nameOrIdPrefix string) (*types.Volume, error)
	DeleteVolume(id string, force bool) error
	AttachVolume(id, instanceId, mntPoint string) error
	DetachVolume(id string) error
	//Hub
	PullImage(params types.PullImagePararms) error
	PushImage(params types.PushImagePararms) error
	RemoteDeleteImage(params types.RemoteDeleteImagePararms) error
}

type ProviderConfig

type ProviderConfig struct {
	UsePartitionTables bool
}

type Providers

type Providers map[string]Provider

func (Providers) Keys

func (providers Providers) Keys() []string

func (Providers) ProviderForImage

func (providers Providers) ProviderForImage(imageId string) (Provider, error)

func (Providers) ProviderForInstance

func (providers Providers) ProviderForInstance(instanceId string) (Provider, error)

func (Providers) ProviderForVolume

func (providers Providers) ProviderForVolume(volumeId string) (Provider, error)

Jump to

Keyboard shortcuts

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