domain

package
v0.4.51 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Submitted = "Submitted"
	Duplicate = "Duplicate"
	Queued    = "Queued"
	Leased    = "Leased"
	Pending   = "Pending"
	Running   = "Running"
	Succeeded = "Succeeded"
	Failed    = "Failed"
	Cancelled = "Cancelled"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JobInfo

type JobInfo struct {
	Status           JobStatus
	PodStatus        []PodStatus
	Job              *api.Job
	LastUpdate       time.Time
	PodLastUpdated   []time.Time
	ClusterId        string
	MaxUsedResources armadaresource.ComputeResources
}

type JobStatus

type JobStatus string

type JobSubmissionDescription

type JobSubmissionDescription struct {
	Name               string
	Count              int
	Namespace          string
	Annotations        map[string]string
	Labels             map[string]string
	RequiredNodeLabels map[string]string
	DelaySubmit        time.Duration
	Priority           float64
	Spec               *v1.PodSpec
}

type JobSubmitFile

type JobSubmitFile struct {
	Queue    string
	JobSetId string
	Jobs     []*api.JobSubmitRequestItem `json:"jobs"`
}

type LoadTestSpecification

type LoadTestSpecification struct {
	Submissions []*SubmissionDescription
}

func (LoadTestSpecification) NumberOfJobsInSpecification

func (loadTest LoadTestSpecification) NumberOfJobsInSpecification() int

type LoadTestSummary

type LoadTestSummary struct {
	SubmittedJobs []string
	CurrentState  *WatchContext
}

type PodStatus

type PodStatus string

type SubmissionDescription

type SubmissionDescription struct {
	Queue               string
	QueuePrefix         string
	JobSetPrefix        string
	Count               int
	QueuePriorityFactor float64
	Jobs                []*JobSubmissionDescription
}

type WatchContext

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

WatchContext keeps track of the current state when processing a stream of events It is not threadsafe and is expected to only ever be used in a single thread

func NewWatchContext

func NewWatchContext() *WatchContext

func (*WatchContext) AreJobsFinished

func (context *WatchContext) AreJobsFinished(ids []string) bool

func (*WatchContext) GetCurrentState

func (context *WatchContext) GetCurrentState() map[string]*JobInfo

func (*WatchContext) GetCurrentStateSummary

func (context *WatchContext) GetCurrentStateSummary() string

func (*WatchContext) GetJobInfo

func (context *WatchContext) GetJobInfo(jobId string) *JobInfo

func (*WatchContext) GetNumberOfFinishedJobs

func (context *WatchContext) GetNumberOfFinishedJobs() int

Return number of finished jobs:

func (*WatchContext) GetNumberOfJobs

func (context *WatchContext) GetNumberOfJobs() int

Return number of jobs:

func (*WatchContext) GetNumberOfJobsInStates

func (context *WatchContext) GetNumberOfJobsInStates(states []JobStatus) int

func (*WatchContext) ProcessEvent

func (context *WatchContext) ProcessEvent(event api.Event)

Jump to

Keyboard shortcuts

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