batchapi

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrJobNotFound                = "batchapi.job_not_found"
	ErrJobIsNotInProgress         = "batchapi.job_is_not_in_progress"
	ErrJobHasAlreadyBeenStopped   = "batchapi.job_has_already_been_stopped"
	ErrNoS3FilesFound             = "batchapi.no_s3_files_found"
	ErrNoDataFoundInJobSubmission = "batchapi.no_data_found_in_job_submission"
	ErrFailedToEnqueueMessages    = "batchapi.failed_to_enqueue_messages"
	ErrMessageExceedsMaxSize      = "batchapi.message_exceeds_max_size"
	ErrConflictingFields          = "batchapi.conflicting_fields"
	ErrBatchItemSizeExceedsLimit  = "batchapi.item_size_exceeds_limit"
	ErrSpecifyExactlyOneKey       = "batchapi.specify_exactly_one_key"
)
View Source
const (
	ManageJobResourcesCronPeriod = 60 * time.Second
)

Variables

This section is empty.

Functions

func DeleteAPI

func DeleteAPI(apiName string, keepCache bool) error

func DryRun

func DryRun(submission *schema.JobSubmission) ([]string, error)

func ErrorConflictingFields

func ErrorConflictingFields(key string, keys ...string) error

func ErrorFailedToEnqueueMessages

func ErrorFailedToEnqueueMessages(message string) error

func ErrorItemSizeExceedsLimit

func ErrorItemSizeExceedsLimit(index int, size int, limit int) error

func ErrorJobHasAlreadyBeenStopped

func ErrorJobHasAlreadyBeenStopped() error

func ErrorJobIsNotInProgress

func ErrorJobIsNotInProgress() error

func ErrorJobNotFound

func ErrorJobNotFound(jobKey spec.JobKey) error

func ErrorMessageExceedsMaxSize

func ErrorMessageExceedsMaxSize(messageSize int, messageLimit int) error

func ErrorNoDataFoundInJobSubmission

func ErrorNoDataFoundInJobSubmission() error

func ErrorNoS3FilesFound

func ErrorNoS3FilesFound() error

func ErrorSpecifyExactlyOneKey

func ErrorSpecifyExactlyOneKey(key string, keys ...string) error

func GetAPIByName

func GetAPIByName(deployedResource *operator.DeployedResource) ([]schema.APIResponse, error)

func GetAllAPIs

func GetAllAPIs(virtualServices []istioclientnetworking.VirtualService, k8sJobs []kbatch.Job, pods []kcore.Pod) ([]schema.APIResponse, error)

Returns all batch apis, for each API returning the most recently submitted job and all running jobs

func GetJobStatus

func GetJobStatus(jobKey spec.JobKey) (*status.JobStatus, error)

func ManageJobResources

func ManageJobResources() error

func ReadLogs

func ReadLogs(jobKey spec.JobKey, socket *websocket.Conn)

func StopJob

func StopJob(jobKey spec.JobKey) error

func SubmitJob

func SubmitJob(apiName string, submission *schema.JobSubmission) (*spec.Job, error)

func UpdateAPI

func UpdateAPI(apiConfig *userconfig.API, models []spec.CuratedModelResource, projectID string) (*spec.API, string, error)

Types

type JobState

type JobState struct {
	spec.JobKey
	Status         status.JobCode
	LastUpdatedMap map[string]time.Time
	EndTime        *time.Time
}

func (JobState) GetLastUpdated

func (j JobState) GetLastUpdated() time.Time

Jump to

Keyboard shortcuts

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