Documentation
¶
Index ¶
- type ConnectsTo
- type DependsOn
- type Docker
- type Driver
- type DriverType
- type DriverUpdater
- type Exec
- type ImagePuller
- type Manifest
- type Port
- type Runtime
- type RuntimeConfig
- type Spec
- func (s *Spec) Args(args ...string) *Spec
- func (s *Spec) ConnectsTo(service, port string) *Spec
- func (s *Spec) DependsOn(name, condition string) *Spec
- func (s *Spec) DriverType() DriverType
- func (s *Spec) Env(key, value string) *Spec
- func (s *Spec) GetPort(name string) *Port
- func (s *Spec) HealthCheckHTTP(url string, expectedStatus int, initialDelay, interval, timeout time.Duration) *Spec
- func (s *Spec) Image(image, tag string) *Spec
- func (s *Spec) Name() string
- func (s *Spec) Port(name string, port int) *Spec
- func (s *Spec) UseExec() *Spec
- type TaskHandle
- type TaskStatus
- type TaskUpdater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectsTo ¶
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
func (*Docker) RunTask ¶
func (d *Docker) RunTask(ctx context.Context, s *Spec, updater DriverUpdater) (TaskHandle, error)
type Driver ¶
type Driver interface {
RunTask(ctx context.Context, s *Spec, updater DriverUpdater) (TaskHandle, error)
}
type DriverType ¶
type DriverType string
const ( DriverTypeDocker DriverType = "docker" DriverTypeExec DriverType = "exec" )
type DriverUpdater ¶
type DriverUpdater interface {
TaskUpdated(event TaskStatus)
}
type Exec ¶
type Exec struct {
}
func (*Exec) RunTask ¶
func (e *Exec) RunTask(ctx context.Context, s *Spec, updater DriverUpdater) (TaskHandle, error)
type ImagePuller ¶
type ImagePuller struct {
// contains filtered or unexported fields
}
func NewImagePuller ¶
func NewImagePuller(client *client.Client) *ImagePuller
type Manifest ¶
type Manifest struct {
// contains filtered or unexported fields
}
func NewManifest ¶
func NewManifest() *Manifest
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewRuntime ¶
func NewRuntime(manifest *Manifest, config *RuntimeConfig) (*Runtime, error)
func (*Runtime) ApplyTemplate ¶
func (*Runtime) NotifyTaskUpdated ¶
func (r *Runtime) NotifyTaskUpdated()
type RuntimeConfig ¶
type Spec ¶
type Spec struct {
// contains filtered or unexported fields
}
func (*Spec) ConnectsTo ¶
func (*Spec) DriverType ¶
func (s *Spec) DriverType() DriverType
func (*Spec) HealthCheckHTTP ¶
type TaskHandle ¶
type TaskHandle interface {
Stop() error
Logs() (io.ReadCloser, error)
Err() error
}
type TaskStatus ¶
type TaskStatus string
const ( TaskStatusPending TaskStatus = "pending" TaskStatusStarting TaskStatus = "starting" TaskStatusDeployed TaskStatus = "deployed" TaskStatusStopped TaskStatus = "stopped" )
type TaskUpdater ¶
type TaskUpdater interface {
NotifyTaskUpdated()
}
Click to show internal directories.
Click to hide internal directories.