Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerInstance ¶
type DockerInstance struct {
// contains filtered or unexported fields
}
func (*DockerInstance) RunScript ¶
func (i *DockerInstance) RunScript(ctx gocontext.Context, output io.WriteCloser) (*RunResult, error)
func (*DockerInstance) UploadScript ¶
func (i *DockerInstance) UploadScript(ctx gocontext.Context, script []byte) error
type DockerProvider ¶
type DockerProvider struct {
// contains filtered or unexported fields
}
func NewDockerProvider ¶
func NewDockerProvider(config map[string]string) (*DockerProvider, error)
func (*DockerProvider) Start ¶
func (p *DockerProvider) Start(ctx gocontext.Context, startAttributes *StartAttributes) (Instance, error)
type FakeInstance ¶
type FakeInstance struct {
// contains filtered or unexported fields
}
func (*FakeInstance) RunScript ¶
func (i *FakeInstance) RunScript(ctx context.Context, writer io.WriteCloser) (*RunResult, error)
func (*FakeInstance) UploadScript ¶
func (i *FakeInstance) UploadScript(ctx context.Context, script []byte) error
type FakeProvider ¶
type FakeProvider struct {
// contains filtered or unexported fields
}
func NewFakeProvider ¶
func NewFakeProvider(logOutput []byte) *FakeProvider
func (*FakeProvider) Start ¶
func (p *FakeProvider) Start(ctx context.Context, _ *StartAttributes) (Instance, error)
type Instance ¶
type Instance interface { // UploadScript uploads the given script to the instance. The script is // a bash script with a shebang (#!/bin/bash) line. Note that this // method should not be called multiple times. UploadScript(context.Context, []byte) error // RunScript runs the build script that was uploaded with the // UploadScript method. RunScript(context.Context, io.WriteCloser) (*RunResult, error) Stop(context.Context) error }
An Instance is something that can run a build script.
type JupiterBrainInstance ¶ added in v0.2.0
type JupiterBrainInstance struct {
// contains filtered or unexported fields
}
func (*JupiterBrainInstance) RunScript ¶ added in v0.2.0
func (i *JupiterBrainInstance) RunScript(ctx context.Context, output io.WriteCloser) (*RunResult, error)
func (*JupiterBrainInstance) Stop ¶ added in v0.2.0
func (i *JupiterBrainInstance) Stop(ctx context.Context) error
func (*JupiterBrainInstance) UploadScript ¶ added in v0.2.0
func (i *JupiterBrainInstance) UploadScript(ctx context.Context, script []byte) error
type JupiterBrainProvider ¶ added in v0.2.0
type JupiterBrainProvider struct {
// contains filtered or unexported fields
}
func NewJupiterBrainProvider ¶ added in v0.2.0
func NewJupiterBrainProvider(config map[string]string) (*JupiterBrainProvider, error)
func (*JupiterBrainProvider) Start ¶ added in v0.2.0
func (p *JupiterBrainProvider) Start(ctx context.Context, startAttributes *StartAttributes) (Instance, error)
type Provider ¶
type Provider interface { // Start starts an instance. It shouldn't return until the instance is // ready to call UploadScript on (this may, for example, mean that it // waits for SSH connections to be possible). Start(context.Context, *StartAttributes) (Instance, error) }
Provider represents some kind of instance provider. It can point to an external HTTP API, or some process locally, or something completely different.
type SauceLabsInstance ¶
type SauceLabsInstance struct {
// contains filtered or unexported fields
}
func (*SauceLabsInstance) RunScript ¶
func (i *SauceLabsInstance) RunScript(ctx context.Context, output io.WriteCloser) (*RunResult, error)
func (*SauceLabsInstance) UploadScript ¶
func (i *SauceLabsInstance) UploadScript(ctx context.Context, script []byte) error
type SauceLabsProvider ¶
type SauceLabsProvider struct {
// contains filtered or unexported fields
}
func NewSauceLabsProvider ¶
func NewSauceLabsProvider(config map[string]string) (*SauceLabsProvider, error)
func (*SauceLabsProvider) Start ¶
func (p *SauceLabsProvider) Start(ctx context.Context, startAttributes *StartAttributes) (Instance, error)
type StartAttributes ¶
type StartAttributes struct { Language string `json:"language"` OsxImage string `json:"osx_image"` Dist string `json:"dist"` Group string `json:"group"` OS string `json:"os"` }
StartAttributes contains some parts of the config which can be used to determine the type of instance to boot up (for example, what image to use)
Click to show internal directories.
Click to hide internal directories.