jobs

package
v0.0.0-...-63319d1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	// Creator.
	Creator string `json:"created_by"`
	// Execution status.
	ExecutionStatus string `json:"execution_status"`
	// Job description.
	Description string `json:"job_desc"`
	// Job ID.
	ID string `json:"job_id"`
	// Job name.
	Name string `json:"job_name"`
	// Type.
	Type string `json:"job_type"`
	// Order ID.
	OrderId string `json:"order_id"`
	// Tenant's project ID.
	ProjectId string `json:"project_id"`
	// Instance ID.
	InstanceId string `json:"service_instance_id"`
}

Job is the structure that represents the detail of the deployment action.

type JobResp

type JobResp struct {
	// Number of tasks.
	TaskCount int `json:"task_count"`
	// Job parameters.
	Job Job `json:"job"`
	// Task parameters.
	Tasks []Task `json:"tasks"`
}

JobResp is the structure that represents the detail of the deployment job and task list.

func Get deprecated

func Get(c *golangsdk.ServiceClient, jobId string) (*JobResp, error)

Get is a method to obtain the details of a specified deployment job using its ID.

Deprecated: Please use the List method to query task details because of the Get method can only obtain maximum of 20 results of task (The first page).

type ListOpts

type ListOpts struct {
	// Instance ID of the component.
	InstanceId string `q:"instance_id"`
	// Number of records to be queried.
	// Default value: 20
	Limit int `q:"limit"`
	// The offset number.
	Offset int `q:"offset"`
	// Descending or ascending order.
	Desc string `q:"desc"`
}

ListOpts allows to filter list data using given parameters.

type Task

type Task struct {
	// Creation time.
	CreatedAt string `json:"created_at"`
	// Health check time.
	LastHealthCheck string `json:"last_health_check"`
	// Message.
	Messages string `json:"messages"`
	// Creator ID.
	OwnerId string `json:"owner_id"`
	// Task ID.
	ID string `json:"task_id"`
	// Task index.
	Index int `json:"task_index"`
	// Task name.
	Name string `json:"task_name"`
	// Task status.
	Status string `json:"task_status"`
	// Task type.
	Type string `json:"task_type"`
}

Task is the structure that represents the detail of the deployment task.

func ExtractTasks

func ExtractTasks(r pagination.Page) ([]Task, error)

ExtractTasks is a method to extract the list of task details for ServiceStage component.

func List

func List(c *golangsdk.ServiceClient, jobId string, opts ListOpts) ([]Task, error)

List is a method to query the list of the deployment task using given ID and opts.

type TaskPage

type TaskPage struct {
	pagination.OffsetPageBase
}

TaskPage is a single page maximum result representing a query by offset page.

func (TaskPage) IsEmpty

func (b TaskPage) IsEmpty() (bool, error)

IsEmpty checks whether a TaskPage is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL