models

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchScheduleDescription added in v1.5.0

type BatchScheduleDescription struct {
	// JobScheduleDescriptions descriptions about scheduling batch jobs
	//
	// required: true
	JobScheduleDescriptions []JobScheduleDescription `json:"jobScheduleDescriptions" yaml:"jobScheduleDescriptions"`

	// DefaultRadixJobComponentConfig holding data relating to resources default configuration
	//
	// required: false
	DefaultRadixJobComponentConfig *RadixJobComponentConfig `json:"defaultRadixJobComponentConfig,omitempty" yaml:"defaultRadixJobComponentConfig,omitempty"`
}

BatchScheduleDescription holds description about batch scheduling job swagger:model BatchScheduleDescription

type BatchStatus added in v1.5.0

type BatchStatus struct {
	//JobStatus Batch job status
	JobStatus
	// JobStatuses of the jobs in the batch
	// required: false
	JobStatuses []JobStatus
}

BatchStatus holds general information about batch status swagger:model BatchStatus

type Env

type Env struct {
	UseSwagger                                   bool
	RadixDNSZone                                 string
	RadixContainerRegistry                       string
	RadixClusterName                             string
	RadixActiveClusterEgressIps                  string
	RadixAppName                                 string
	RadixEnvironment                             string
	RadixComponentName                           string
	RadixDeploymentName                          string
	RadixDeploymentNamespace                     string
	RadixJobSchedulersPerEnvironmentHistoryLimit int
	RadixPort                                    string
	RadixDefaultCpuLimit                         string
	RadixDefaultMemoryLimit                      string
	//RadixBatchSchedulerImageFullName The name of the Radix batch cheduler image, including comtainer repository and tag
	RadixBatchSchedulerImageFullName string
}

Env instance variables

func NewEnv

func NewEnv() *Env

NewEnv Constructor

type JobList added in v1.5.0

type JobList []*batchv1.Job

func (JobList) Where added in v1.5.0

func (jl JobList) Where(predicate wherePredicateFunc) JobList

type JobScheduleDescription

type JobScheduleDescription struct {
	// JobId Optional ID of a job
	//
	// required: false
	// example: 'job1'
	JobId string `json:"jobId,omitempty"`

	// Payload holding json data to be mapped to component
	//
	// required: false
	// example: {'data':'value'}
	Payload string `json:"payload"`

	// RadixJobComponentConfig holding data relating to resource configuration
	//
	// required: false
	RadixJobComponentConfig `json:",inline"`
}

JobScheduleDescription holds description about scheduling job swagger:model JobScheduleDescription

type JobStatus

type JobStatus struct {
	// JobId Optional ID of a job
	//
	// required: false
	// example: 'job1'
	JobId string `json:"jobId"`
	// BatchName Optional Batch ID of a job
	//
	// required: false
	// example: 'batch1'
	BatchName string `json:"batchName"`

	// Name of the job
	// required: true
	// example: calculator
	Name string `json:"name"`

	// Created timestamp
	//
	// required: true
	// example: 2006-01-02T15:04:05Z
	Created string `json:"created"`

	// Started timestamp
	//
	// required: false
	// example: 2006-01-02T15:04:05Z
	Started string `json:"started"`

	// Ended timestamp
	//
	// required: false
	// example: 2006-01-02T15:04:05Z
	Ended string `json:"ended"`

	// Status of the job
	//
	// required: false
	// Enum: Waiting,Running,Succeeded,Stopping,Stopped,Failed
	// example: Waiting
	Status string `json:"status"`

	// Status message, if any, of the job
	//
	// required: false
	// example: "Error occurred"
	Message string `json:"message"`
}

JobStatus holds general information about job status swagger:model JobStatus

type ProgressStatus

type ProgressStatus int

ProgressStatus Enumeration of the statuses of a job or step

const (
	// Running Active
	Running ProgressStatus = iota

	// Succeeded JobStatus/step succeeded
	Succeeded

	// Failed JobStatus/step failed
	Failed

	// Waiting JobStatus/step pending
	Waiting

	// Stopping job
	Stopping

	// Stopped job
	Stopped
)

func GetStatusFromJobStatus

func GetStatusFromJobStatus(jobStatus v1.JobStatus) ProgressStatus

GetStatusFromJobStatus Gets status from kubernetes job status

func (ProgressStatus) String

func (p ProgressStatus) String() string

type RadixJobComponentConfig added in v1.1.0

type RadixJobComponentConfig struct {
	// Resource describes the compute resource requirements.
	//
	// required: false
	Resources *v1.ResourceRequirements `json:"resources,omitempty"`
	// Node defines node attributes, where container should be scheduled
	//
	// required: false
	Node *v1.RadixNode `json:"node,omitempty"`

	// TimeLimitSeconds defines maximum job run time. Corresponds to ActiveDeadlineSeconds in K8s.
	//
	// required: false
	TimeLimitSeconds *int64 `json:"timeLimitSeconds,omitempty"`
}

RadixJobComponentConfig holds description of RadixJobComponent

type Status

type Status struct {

	// Status of the operation.
	// One of: "Success" or "Failure".
	// example: Failure
	Status string `json:"status,omitempty"`
	// A human-readable description of the status of this operation.
	// required: false
	// example: job job123 is not found
	Message string `json:"message,omitempty"`
	// A machine-readable description of why this operation is in the
	// "Failure" status. If this value is empty there
	// is no information available. A Reason clarifies an HTTP status
	// code but does not override it.
	// required: false
	// example: NotFound
	Reason StatusReason `json:"reason,omitempty"`

	// Suggested HTTP return code for this status, 0 if not set.
	// required: false
	// example: 404
	Code int `json:"code,omitempty"`
}

Status is a return value for calls that don't return other objects or when a request returns an error swagger:model Status

type StatusReason

type StatusReason string
const (
	StatusSuccess = "Success"
	StatusFailure = "Failure"
	// StatusReasonUnknown means the server has declined to indicate a specific reason.
	// Status code 500.
	StatusReasonUnknown StatusReason = "InternalError"
	// StatusReasonNotFound means one or more resources required for this operation
	// could not be found.
	// Status code 404
	StatusReasonNotFound StatusReason = "NotFound"
	// StatusReasonInvalid means the requested create or update operation cannot be
	// completed due to invalid data provided as part of the request. The client may
	// need to alter the request.
	// Status code 422
	StatusReasonInvalid StatusReason = "Invalid"
)

Jump to

Keyboard shortcuts

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