Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetCapacity(ctx context.Context) error ListTasks(ctx context.Context, deploymentName string) ([]Task, error) GetTask(ctx context.Context, taskId string) error CreateTask(context.Context, CreateTaskParams) error UpdateTask(ctx context.Context, taskId string, updateParams string) error DeleteTask(ctx context.Context, taskId string) error DeleteDeployment(ctx context.Context, deploymentName string) error }
type CreateTaskParams ¶
type ImageRef ¶
type ImageRef struct { FullName string `json:"full_name"` Registry string `json:"registry"` Repository string `json:"repository"` Tag string `json:"tag"` Digest string `json:"digest"` }
func NewImageRef ¶
type Task ¶
type Task struct { ID ulid.ULID `json:"id"` AppName string `json:"app_name"` DeploymentName string `json:"deployment_name"` StackName string `json:"stack_name"` ContainerID string `json:"container_id"` CPU float64 `json:"cpu"` StartedAt time.Time `json:"started_at"` Status TaskStatus `json:"status"` Memory int `json:"memory"` Image ImageRef `json:"image"` HostPortBindings map[string]string `json:"host_port_bindings"` }
func NewTask ¶
func NewTask(taskDef TaskDefinition) (*Task, error)
func (*Task) QualifiedName ¶
type TaskDefinition ¶
type TaskDefinition struct { AppName string `json:"app_name"` DeploymentName string `json:"deployment_name"` StackName string `json:"stack_name"` Image string `json:"image"` HealthCheck string `json:"health_check"` Cpu float64 `json:"cpu"` Memory int `json:"memory"` ExposedPorts []string `json:"exposed_ports"` }
type TaskStatus ¶
type TaskStatus int
const ( TaskStatusUnknown TaskStatus = iota TaskStatusPending TaskStatusImagePull TaskStatusCreating TaskStatusStarting TaskStatusRunning TaskStatusSuspended TaskStatusExited TaskStatusCrashed )
Click to show internal directories.
Click to hide internal directories.