Documentation ¶
Index ¶
- func NewClient() (*client.Client, error)
- func NewProvider(req *pb.CreateRequest) providers.Provider
- func NewProviderWithConfig(cfg Config) providers.Provider
- type Config
- type Provider
- func (p *Provider) Annotate(id string, l labels.Labels) error
- func (p *Provider) Apply() error
- func (p *Provider) AwaitReadiness() chan error
- func (p *Provider) Cancel() error
- func (p *Provider) Clone() error
- func (p *Provider) ImageName() string
- func (p *Provider) ProbeReadiness() (bool, error)
- func (p *Provider) Read() error
- func (p *Provider) Running() ([]types.Container, error)
- func (p *Provider) Select() (target.Selection, error)
- func (p *Provider) Start() (string, error)
- func (p *Provider) Stop() error
- func (p *Provider) TaggedImage() (*types.ImageSummary, error)
- func (p *Provider) Teardown() error
- func (p *Provider) UniqueContainerName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(req *pb.CreateRequest) providers.Provider
NewProvider initializes a Provider with defaults
func NewProviderWithConfig ¶
Types ¶
type Config ¶
type Config struct { Target target.Target // Name is the name of the container Name string // Version is the version of the image or container Version string // Image is hte image name of the docker image Image string // Tag is the docker tag, defaults to :latest Tag string // ID is the id of the running container ID string }
Config holds allowed values for an implemented resource provider. Any value outside of this config is unable to be modified during an experiment
type Provider ¶
type Provider struct { // Config holds our internal configuration options // for the instance of the Provider Config Config // RemoteConfig identifies the remote config RemoteConfig Config }
Provider implements an docker Provider
func (*Provider) Annotate ¶
Annotate should implement applying labels or tags for a given resource type
func (*Provider) AwaitReadiness ¶
AwaitReadiness should be implemented to detect when a Provider has finished setting up a variant and can begin using it in an experiment
func (*Provider) ImageName ¶
ImageName is the complete resource identifier to pull an image from a registry by name, and tag
func (*Provider) ProbeReadiness ¶
ProbeReadiness checks that the provisioned resource is available and ready to be included in a live experiment
func (*Provider) Read ¶
Pull will pull an image from a registry, if the image is already pulled, it'll verify this and just return. TODO: add a 'force pull' and support options
func (*Provider) TaggedImage ¶
func (p *Provider) TaggedImage() (*types.ImageSummary, error)
TaggedImage list any image that matches the image and version/tag
func (*Provider) Teardown ¶
Teardown eradicates any resource that has been provisioned as part of a variant
func (*Provider) UniqueContainerName ¶
UniqueContainerName creates a unique name for running the image as a container