Documentation ¶
Index ¶
- Constants
- type CreateDatasetInput
- type CreateDatasetOutput
- type CreatePlanInput
- type CreatePlanOutput
- type CreateSecretInput
- type CreateSecretOutput
- type CreateTokenInput
- type CreateTokenOutput
- type CreateWorkloadInput
- type CreateWorkloadOutput
- type DatasetSummary
- type DeletePlanInput
- type DeletePlanOutput
- type DeleteSecretInput
- type DeleteSecretOutput
- type DescribeDatasetInput
- type DescribeDatasetOutput
- type DescribeSecretInput
- type DescribeSecretOutput
- type DescribeTaskInput
- type DescribeTaskOutput
- type DescribeWorkloadInput
- type DescribeWorkloadOutput
- type Error
- type ExpelProjectInput
- type ExpelProjectOutput
- type ListDatasetsInput
- type ListDatasetsOutput
- type ListPlansInput
- type ListPlansOutput
- type ListSecretsInput
- type ListSecretsOutput
- type ListTasksInput
- type ListTasksOutput
- type ListWorkloadsInput
- type ListWorkloadsOutput
- type PlaceProjectInput
- type PlaceProjectOutput
- type PlanSummary
- type RemovePlanInput
- type RemovePlanOutput
- type Resource
- type Run
- type SecretSummary
- type SendRunFailureInput
- type SendRunFailureOutput
- type SendRunHeartbeatInput
- type SendRunHeartbeatOutput
- type SendRunSuccessInput
- type SendRunSuccessOutput
- type SendUploadHeartbeatInput
- type SendUploadHeartbeatOutput
- type SendUploadSuccessInput
- type SendUploadSuccessOutput
- type StartTaskInput
- type StartTaskOutput
- type StopTaskInput
- type StopTaskOutput
- type StopWorkloadInput
- type StopWorkloadOutput
- type TaskStatus
- type TaskSummary
- type UpdatePlanInput
- type UpdatePlanOutput
- type WorkerCondition
- type WorkerLogsInput
- type WorkerLogsOutput
- type WorkerSummary
- type WorkloadSummary
Constants ¶
const ( //DatasetUploadStatusCreated is the created upload status DatasetUploadStatusCreated = "CREATED" //DatasetUploadStatusUploading is the uploading upload status DatasetUploadStatusUploading = "UPLOADING" //DatasetUploadStatusSuccess is the success upload status DatasetUploadStatusSuccess = "SUCCESS" )
const ( //SecretTypeRegistry is the type for registring images SecretTypeRegistry string = "registry" //SecretTypeOpaque is the type that allows secrets that are opaque SecretTypeOpaque string = "opaque" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateDatasetInput ¶
type CreateDatasetInput struct {
ProjectID string `json:"project_id" valid:"required"`
}
CreateDatasetInput is used as input to dataset creation
type CreateDatasetOutput ¶
type CreateDatasetOutput struct { DatasetSummary HeartbeatInterval time.Duration `json:"heartbeat_interval"` }
CreateDatasetOutput is returned from creating a dataset
type CreatePlanInput ¶ added in v0.5.9
type CreatePlanInput struct { PlanID string `json:"billing_package_id"` ComputeUnits string `json:"compute_units" valid:"required"` }
CreatePlanInput is the input for assigning a plan to a project. This results in the creation of a quota in the right namespace.
type CreatePlanOutput ¶ added in v0.5.9
type CreatePlanOutput struct { ProjectID string `json:"project_id" valid:"required"` PlanID string `json:"billing_package_id" valid:"required"` ComputeUnits string `json:"compute_units" valid:"required"` }
CreatePlanOutput is the output from assigning a plan to a project.
type CreateSecretInput ¶ added in v0.5.6
type CreateSecretInput struct { ProjectID string `json:"project_id" valid:"required"` Name string `json:"name" valid:"required"` Key string `json:"key"` Value string `json:"value"` DockerUsername string `json:"dockerUsername"` DockerPassword string `json:"dockerPassword"` Type string `json:"type" valid:"required,in(opaque|registry)"` }
CreateSecretInput is the input for creating a secret
type CreateSecretOutput ¶ added in v0.5.6
type CreateSecretOutput struct { ProjectID string `json:"project_id" valid:"required"` Name string `json:"name" valid:"required"` Type string `json:"type" valid:"required,in(opaque|registry)"` }
CreateSecretOutput is the output from creating a secret
type CreateTokenInput ¶
type CreateTokenInput struct {
ProjectID string `json:"project_id" valid:"required"`
}
CreateTokenInput is input for token creation
type CreateTokenOutput ¶
type CreateTokenOutput struct { AWSRegion string `json:"aws_region"` AWSAccessKeyID string `json:"aws_access_key_id"` AWSExpiration time.Time `json:"aws_expiration"` AWSSecretAccessKey string `json:"aws_secret_access_key"` AWSSessionToken string `json:"aws_session_token"` }
CreateTokenOutput is output for token creation
type CreateWorkloadInput ¶ added in v0.4.15
type CreateWorkloadInput struct { ProjectID string `json:"project_id" valid:"required"` Image string `json:"image" valid:"required"` NrOfWorkers int `json:"nr_of_workers" valid:"required"` InputDatasetID string `json:"input_dataset_id"` UseCuteur bool `json:"use_cuteur"` Env map[string]string `json:"env"` PullSecret string `json:"pull_secret"` ComputeUnits uint64 `json:"compute_units"` }
CreateWorkloadInput is input for workload creation
type CreateWorkloadOutput ¶ added in v0.4.15
type CreateWorkloadOutput struct {
WorkloadSummary
}
CreateWorkloadOutput is output for workload creation
type DatasetSummary ¶
type DatasetSummary struct { ProjectID string `json:"project_id"` DatasetID string `json:"dataset_id"` Bucket string `json:"bucket"` DatasetRoot string `json:"dataset_root"` ProjectRoot string `json:"project_root"` UploadExpire int64 `json:"upload_expire"` UploadStatus string `json:"upload_status"` CreatedAt int64 `json:"created_at"` }
DatasetSummary is a small version of
type DeletePlanInput ¶ added in v0.5.9
type DeletePlanInput struct { }
DeletePlanInput is the input for deleting a plan
type DeletePlanOutput ¶ added in v0.5.9
type DeletePlanOutput struct { }
DeletePlanOutput is the output from deleting a plan
type DeleteSecretInput ¶ added in v0.5.6
type DeleteSecretInput struct { ProjectID string `json:"project_id" valid:"required"` Name string `json:"name" valid:"required"` }
DeleteSecretInput is the input for deleting a secret
type DeleteSecretOutput ¶ added in v0.5.6
type DeleteSecretOutput struct { }
DeleteSecretOutput is the output from deleting a secret
type DescribeDatasetInput ¶
type DescribeDatasetInput struct { ProjectID string `json:"project_id" valid:"required"` DatasetID string `json:"dataset_id" valid:"required"` }
DescribeDatasetInput is input for dataset creation
type DescribeDatasetOutput ¶
type DescribeDatasetOutput struct {
DatasetSummary
}
DescribeDatasetOutput is output for dataset creation
type DescribeSecretInput ¶ added in v0.5.6
type DescribeSecretInput struct { ProjectID string `json:"project_id" valid:"required"` Name string `json:"name" valid:"required"` }
DescribeSecretInput is the input for describing a secret
type DescribeSecretOutput ¶ added in v0.5.6
type DescribeSecretOutput struct { ProjectID string `json:"project_id" valid:"required"` Name string `json:"name" valid:"required"` Key string `json:"key"` Value string `json:"value"` DockerUsername string `json:"dockerUsername"` DockerPassword string `json:"dockerPassword"` Type string `json:"type" valid:"required,in(opaque|registry)"` }
DescribeSecretOutput is the output from describing a secret
type DescribeTaskInput ¶
type DescribeTaskInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id" valid:"required"` TaskID int64 `json:"task_id" valid:"required"` }
DescribeTaskInput is input for task creation
type DescribeTaskOutput ¶
type DescribeTaskOutput struct { TaskSummary ExecutionARN string `json:"execution_arn"` NumDispatches int64 `json:"num_dispatches"` Result string `json:"result,omitempty"` LastErrCode string `json:"last_err_code,omitempty"` LastErrMessage string `json:"last_err_message,omitempty"` }
DescribeTaskOutput is output for task creation
type DescribeWorkloadInput ¶ added in v0.4.15
type DescribeWorkloadInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id"` }
DescribeWorkloadInput is input for getting workload information
type DescribeWorkloadOutput ¶ added in v0.4.15
type DescribeWorkloadOutput struct { WorkloadSummary TaskCount map[TaskStatus]int `json:"task_count"` Env map[string]string `json:"env"` PullSecret string `json:"pull_secret"` }
DescribeWorkloadOutput is output for getting workload information
type Error ¶
type Error struct { //Retry indicates if the client can retry the request as is, this is mostly false on validation/encoding errors and true in other cases Retry bool `json:"retry"` //Message contains a overall message to the user, it should always be set to provide some feedback Message string `json:"message"` //Trace is set if the server is running in development mode, if it is empty it can be ignored Trace []string `json:"trace,omitempty"` //Fields can hold validation messages for individual fields, if empty the cause of the overal error is not due to specific field's input Fields map[string]string `json:"fields,omitempty"` }
Error struct is returned by the API if anything goes wrong
type ExpelProjectInput ¶
type ExpelProjectInput struct {
ProjectID string `json:"project_id" valid:"required"`
}
ExpelProjectInput is input for placement creation
type ExpelProjectOutput ¶
type ExpelProjectOutput struct{}
ExpelProjectOutput is output for placement creation
type ListDatasetsInput ¶
type ListDatasetsInput struct {
ProjectID string `json:"project_id" valid:"required"`
}
ListDatasetsInput is input for dataset creation
type ListDatasetsOutput ¶
type ListDatasetsOutput struct {
Datasets []*DatasetSummary
}
ListDatasetsOutput is output for dataset creation
type ListPlansInput ¶ added in v0.5.9
type ListPlansInput struct { }
ListPlansInput is the input for listing plans.
type ListPlansOutput ¶ added in v0.5.9
type ListPlansOutput struct { ProjectID string `json:"project_id" valid:"required"` Plans []*PlanSummary `json:"billing_packages" valid:"required"` Total *Resource Used *Resource }
ListPlansOutput is the output from listing plans of a project
type ListSecretsInput ¶ added in v0.5.6
type ListSecretsInput struct {
ProjectID string `json:"project_id" valid:"required"`
}
ListSecretsInput is the input for listing secrets
type ListSecretsOutput ¶ added in v0.5.6
type ListSecretsOutput struct { ProjectID string `json:"project_id" valid:"required"` Secrets []*SecretSummary `json:"secrets" valid:"required"` }
ListSecretsOutput is the output from listing secrets
type ListTasksInput ¶
type ListTasksInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id" valid:"required"` OnlySuccessTasks bool `json:"only_success_tasks" valid:"required"` }
ListTasksInput is input for task creation
type ListTasksOutput ¶
type ListTasksOutput struct {
Tasks []*TaskSummary
}
ListTasksOutput is output for task creation
type ListWorkloadsInput ¶ added in v0.4.15
type ListWorkloadsInput struct {
ProjectID string `json:"project_id" valid:"required"`
}
ListWorkloadsInput is input for workload listing
type ListWorkloadsOutput ¶ added in v0.4.15
type ListWorkloadsOutput struct {
Workloads []*WorkloadSummary
}
ListWorkloadsOutput is output for workload listing
type PlaceProjectInput ¶
type PlaceProjectInput struct { ProjectID string `json:"project_id" valid:"required"` Host string `json:"host" valid:"required"` Token string `json:"token"` CAPem string `json:"ca_pem"` Password string `json:"password"` Username string `json:"username"` Insecure bool `json:"insecure"` ComputeUnits string `json:"compute_units"` }
PlaceProjectInput is input for placement creation
type PlaceProjectOutput ¶
type PlaceProjectOutput struct { }
PlaceProjectOutput is output for placement creation
type PlanSummary ¶ added in v0.5.9
type PlanSummary struct { ComputeUnits string `json:"compute_units" valid:"required"` PlanID string `json:"billing_package_id" valid:"required"` }
PlanSummary is summary of a plan
type RemovePlanInput ¶ added in v0.5.9
type RemovePlanInput struct { }
RemovePlanInput is the input for removing a plan from a project
type RemovePlanOutput ¶ added in v0.5.9
type RemovePlanOutput struct { }
RemovePlanOutput is the output from removing a plan from a project
type Resource ¶ added in v0.5.7
type Resource struct { RequestsCPU string `json:"requests_cpu" valid:"required"` RequestsMemory string `json:"requests_memory" valid:"required"` LimitsCPU string `json:"limits_cpu" valid:"required"` LimitsMemory string `json:"limits_memory" valid:"required"` }
Resource is a general struct that will be used in our list payloads.
type Run ¶
type Run struct { ProjectID string `json:"project_id"` WorkloadID string `json:"workload_id" valid:"required"` TaskID int64 `json:"task_id"` Token string `json:"token"` Cmd []string `json:"cmd"` Env map[string]string `json:"env"` Stdin []byte `json:"stdin"` }
An Run acts as an reference to a task instance
type SecretSummary ¶ added in v0.5.6
type SecretSummary struct { ProjectID string `json:"project_id" valid:"required"` Name string `json:"name" valid:"required"` Type string `json:"type" valid:"required,in(opaque|registry)"` }
SecretSummary is summary of a secret
type SendRunFailureInput ¶
type SendRunFailureInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id" valid:"required"` TaskID int64 `json:"task_id" valid:"required"` RunToken string `json:"run_token" valid:"required"` ErrorCode string `json:"error_code"` ErrorMessage string `json:"error_message"` }
SendRunFailureInput is input for marking a run as failed
type SendRunFailureOutput ¶
type SendRunFailureOutput struct{}
SendRunFailureOutput is output from marking a run as failed
type SendRunHeartbeatInput ¶
type SendRunHeartbeatInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id" valid:"required"` TaskID int64 `json:"task_id" valid:"required"` RunToken string `json:"run_token" valid:"required"` }
SendRunHeartbeatInput is input for run creation
type SendRunHeartbeatOutput ¶
type SendRunHeartbeatOutput struct {
HasExpired bool `json:"has_expired"`
}
SendRunHeartbeatOutput is output for run creation
type SendRunSuccessInput ¶
type SendRunSuccessInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id" valid:"required"` TaskID int64 `json:"task_id" valid:"required"` RunToken string `json:"run_token" valid:"required"` Result string `json:"result"` OutputDatasetID string `json:"output_dataset_id"` }
SendRunSuccessInput is input for marking a run as failed
type SendRunSuccessOutput ¶
type SendRunSuccessOutput struct{}
SendRunSuccessOutput is output from marking a run as failed
type SendUploadHeartbeatInput ¶
type SendUploadHeartbeatInput struct { ProjectID string `json:"project_id" valid:"required"` DatasetID string `json:"dataset_id" valid:"required"` }
SendUploadHeartbeatInput is input for dataset creation
type SendUploadHeartbeatOutput ¶
type SendUploadHeartbeatOutput struct {
HasExpired bool `json:"has_expired"`
}
SendUploadHeartbeatOutput is output for dataset creation
type SendUploadSuccessInput ¶
type SendUploadSuccessInput struct { ProjectID string `json:"project_id" valid:"required"` DatasetID string `json:"dataset_id" valid:"required"` }
SendUploadSuccessInput is input for marking a run as failed
type SendUploadSuccessOutput ¶
type SendUploadSuccessOutput struct{}
SendUploadSuccessOutput is output from marking a run as failed
type StartTaskInput ¶
type StartTaskInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id" valid:"required"` Cmd []string `json:"cmd"` Env map[string]string `json:"env"` Stdin []byte `json:"stdin"` }
StartTaskInput is input for task creation
type StartTaskOutput ¶
type StartTaskOutput struct {
TaskSummary
}
StartTaskOutput is output for task creation
type StopTaskInput ¶
type StopTaskInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id" valid:"required"` TaskID int64 `json:"task_id" valid:"required"` }
StopTaskInput is input for task creation
type StopWorkloadInput ¶ added in v0.4.15
type StopWorkloadInput struct { ProjectID string `json:"project_id" valid:"required"` WorkloadID string `json:"workload_id" valid:"required"` }
StopWorkloadInput is input for workload deletion
type StopWorkloadOutput ¶ added in v0.4.15
type StopWorkloadOutput struct{}
StopWorkloadOutput is output for workload deletion
type TaskStatus ¶ added in v0.4.15
type TaskStatus string
TaskStatus represents the status of a task
type TaskSummary ¶
type TaskSummary struct { TaskID int64 `json:"task_id"` TTL int64 `json:"ttl"` WorkloadID string `json:"workload_id"` Status string `json:"status,omitempty"` OutputDatasetID string `json:"output_dataset_id"` Cmd []string `json:"cmd"` }
TaskSummary is a small version of
type UpdatePlanInput ¶ added in v0.5.9
type UpdatePlanInput struct { OnDemand bool `json:"on_demand"` ComputeUnits string `json:"compute_units" valid:"required"` }
UpdatePlanInput is the input for updating the plan capacity
type UpdatePlanOutput ¶ added in v0.5.9
type UpdatePlanOutput struct { ProjectID string `json:"project_id" valid:"required"` PlanID string `json:"billing_package_id" valid:"required"` ComputeUnits string `json:"compute_units" valid:"required"` }
UpdatePlanOutput is the output for updating the plan capacity
type WorkerCondition ¶ added in v0.5.1
WorkerCondition describes the worker status at a point in time
type WorkerLogsInput ¶ added in v0.5.1
type WorkerLogsInput struct { ProjectID string `json:"project_id"` WorkloadID string `json:"workload_id"` WorkerID string `json:"worker_id"` }
WorkerLogsInput is for fetching worker logs
type WorkerLogsOutput ¶ added in v0.5.1
type WorkerLogsOutput struct {
Data []byte `json:"data"`
}
WorkerLogsOutput contains raw log data from the cluster
type WorkerSummary ¶
type WorkerSummary struct { WorkerID string `json:"worker_id"` Status string `json:"status"` Conditions []*WorkerCondition `json:"conditions"` }
WorkerSummary is a small version
type WorkloadSummary ¶ added in v0.4.15
type WorkloadSummary struct { ProjectID string `json:"project_id"` WorkloadID string `json:"workload_id"` QueueURL string `json:"queue_url"` Image string `json:"image"` NrOfWorkers int `json:"nr_of_workers"` InputDatasetID string `json:"input_dataset_id"` CreatedAt int64 `json:"created_at"` ComputeUnits string `json:"compute_units"` Workers []*WorkerSummary `json:"workers"` }
WorkloadSummary is a smaller representation of a workload