task

package
v1.3.0-rc.0...-12c9840 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BadSpec = errors.New("invalid service spec")
)

Functions

This section is empty.

Types

type Action

type Action int
const (
	TaskCreate Action = iota
	TaskDestroy
	TaskStatus
	TaskRemove
	TaskUpdate
	TaskInspect
	TaskCancel
	TaskPrecheck
	TaskJobVolumeCreate
	TaskKillPod
	TaskScale
	TaskKedaScaledObjectCreate
	TaskKedaScaledObjectApply
	TaskKedaScaledObjectCancel
	TaskKedaScaledObjectReApply
	TaskVPAObjectApply
	TaskVPAObjectCancel
	TaskVPAObjectReApply
)

func (*Action) String

func (a *Action) String() string

type Result

type Result interface {
	Wait(ctx context.Context) TaskResponse
}

type Sched

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

func NewSched

func NewSched() (*Sched, error)

func (*Sched) FindExecutor

func (s *Sched) FindExecutor(name, kind string) (executortypes.Executor, error)

func (*Sched) ListExecutors

func (s *Sched) ListExecutors() []executortypes.Executor

func (*Sched) PrintPoolUsage

func (s *Sched) PrintPoolUsage()

func (*Sched) Return

func (s *Sched) Return(ctx context.Context, t *Task, resp TaskResponse)

func (*Sched) Send

func (s *Sched) Send(ctx context.Context, req TaskRequest) (Result, error)

type Task

type Task struct {
	TaskRequest
	// contains filtered or unexported fields
}

func (*Task) Run

func (t *Task) Run(ctx context.Context) TaskResponse

func (*Task) String

func (t *Task) String() string

func (*Task) Wait

func (t *Task) Wait(ctx context.Context) TaskResponse

type TaskRequest

type TaskRequest struct {
	Spec         interface{}
	ExecutorKind string
	ExecutorName string
	ID           string
	Action       Action
}

type TaskResponse

type TaskResponse struct {
	Extra interface{}
	// contains filtered or unexported fields
}

func (*TaskResponse) Err

func (tr *TaskResponse) Err() error

func (*TaskResponse) Status

func (tr *TaskResponse) Status() apistructs.StatusDesc

Jump to

Keyboard shortcuts

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