util

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionType

type ConditionType string

ConditionType describes the various conditions a Job can be in.

const (
	// JobRunning means that Job was deployed by Trial.
	// Job doesn't have succeeded or failed condition.
	JobRunning ConditionType = "Running"

	// JobSucceeded means that Job status satisfies Trial success condition
	JobSucceeded ConditionType = "Succeeded"

	// JobFailed means that Job status satisfies Trial failure condition
	JobFailed ConditionType = "Failed"
)

type TrialJobStatus

type TrialJobStatus struct {
	// Condition describes the state of the Job at a certain point.
	// Can be either Running, Succeeded or Failed
	Condition ConditionType `json:"condition,omitempty"`

	// The reason received from Job's status, if it is possible
	Reason string `json:"reason,omitempty"`

	// The message received from Job's status, if it is possible
	Message string `json:"message,omitempty"`
}

TrialJobStatus is the internal representation for deployed Job status

func GetDeployedJobStatus

func GetDeployedJobStatus(trial *trialsv1beta1.Trial, deployedJob *unstructured.Unstructured) (*TrialJobStatus, error)

GetDeployedJobStatus returns internal representation for deployed Job status.

type TrialsCollector

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

func NewTrialsCollector

func NewTrialsCollector(store cache.Cache, registerer prometheus.Registerer) *TrialsCollector

func (*TrialsCollector) Collect

func (m *TrialsCollector) Collect(ch chan<- prometheus.Metric)

Collect implements the prometheus.Collector interface.

func (*TrialsCollector) Describe

func (m *TrialsCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements the prometheus.Collector interface.

func (*TrialsCollector) IncreaseTrialsCreatedCount

func (c *TrialsCollector) IncreaseTrialsCreatedCount(ns string)

func (*TrialsCollector) IncreaseTrialsDeletedCount

func (c *TrialsCollector) IncreaseTrialsDeletedCount(ns string)

func (*TrialsCollector) IncreaseTrialsFailedCount

func (c *TrialsCollector) IncreaseTrialsFailedCount(ns string)

func (*TrialsCollector) IncreaseTrialsMetricsUnavailableCount added in v0.14.0

func (c *TrialsCollector) IncreaseTrialsMetricsUnavailableCount(ns string)

func (*TrialsCollector) IncreaseTrialsSucceededCount

func (c *TrialsCollector) IncreaseTrialsSucceededCount(ns string)

Jump to

Keyboard shortcuts

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