presentation

package
v0.0.0-...-35d8de9 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package presentation implements common method to API and UI serving.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJobTraits

func GetJobTraits(ctx context.Context, cat catalog.Catalog, j *engine.Job) (task.Traits, error)

GetJobTraits asks the corresponding task manager for a traits struct.

Types

type PublicStateKind

type PublicStateKind string

PublicStateKind defines state of the job which is exposed in UI and API instead of internal states which are kept as an implementation detail.

const (
	PublicStateDisabled  PublicStateKind = "DISABLED"
	PublicStatePaused    PublicStateKind = "PAUSED"
	PublicStateRunning   PublicStateKind = "RUNNING"
	PublicStateScheduled PublicStateKind = "SCHEDULED"
	PublicStateWaiting   PublicStateKind = "WAITING"
)

When a PublicStateKind is added/removed/updated, update scheduler api proto doc for `JobState`.

func GetPublicStateKind

func GetPublicStateKind(j *engine.Job, traits task.Traits) PublicStateKind

GetPublicStateKind returns user-friendly state for a job.

Jump to

Keyboard shortcuts

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