job

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCancellable

func IsCancellable(status *client.JobStatus) bool

IsCancellable returns true if the job is cancellable. JobStatus only contains terminal values, so a nil value indicates that the job is cancellable.

Types

type CreateJobInput

type CreateJobInput struct {
	ServiceID    string
	StartCommand string
	PlanID       string
}

type ListItem

type ListItem struct {
	// contains filtered or unexported fields
}

func NewListItem

func NewListItem(j *clientjob.Job) ListItem

func (ListItem) Description

func (i ListItem) Description() string

func (ListItem) FilterValue

func (i ListItem) FilterValue() string

func (ListItem) Height

func (i ListItem) Height() int

func (ListItem) Job

func (i ListItem) Job() *clientjob.Job

func (ListItem) Title

func (i ListItem) Title() string

type ListJobsInput

type ListJobsInput struct {
	ServiceID      string
	Status         []string
	CreatedBefore  *time.Time
	CreatedAfter   *time.Time
	StartedBefore  *time.Time
	StartedAfter   *time.Time
	FinishedBefore *time.Time
	FinishedAfter  *time.Time
}

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func NewRepo

func NewRepo(c *client.ClientWithResponses) *Repo

func (*Repo) CancelJob

func (r *Repo) CancelJob(ctx context.Context, serviceID, jobID string) (*clientjob.Job, error)

func (*Repo) CreateJob

func (r *Repo) CreateJob(ctx context.Context, input CreateJobInput) (*clientjob.Job, error)

func (*Repo) GetJob

func (r *Repo) GetJob(ctx context.Context, serviceID, jobID string) (*clientjob.Job, error)

func (*Repo) ListJobs

func (r *Repo) ListJobs(ctx context.Context, input ListJobsInput, cur client.Cursor) (client.Cursor, []*clientjob.Job, error)

Jump to

Keyboard shortcuts

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