luci: go.chromium.org/luci/scheduler/appengine/presentation Index | Files

package presentation

import "go.chromium.org/luci/scheduler/appengine/presentation"

package presentation implements common method to API and UI serving.

Index

Package Files

doc.go state.go

func GetJobTraits Uses

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

GetJobTraits asks the corresponding task manager for a traits struct.

type PublicStateKind Uses

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 Uses

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

GetPublicStateKind returns user-friendly state for a job.

Package presentation imports 6 packages (graph) and is imported by 4 packages. Updated 2018-12-19. Refresh now. Tools for package owners.