lifecycle

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	NewExecution() string
	AllAdded(executionID string) error
	AddPod(job Job) error
	PodTerminated(executionID, node string, phase corev1.PodPhase) error
	ReportReceived(executionID, node string, processingError error, results Results)
	Config() config.Config
	// Has return true if the executionId is known
	Has(node string, executionId string) bool
}

Cache interface

func NewCache

func NewCache(cfg *config.Config, prom *Collector) Cache

NewCache get a new cache

type Collector

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

Collector struct

func NewPromCollector

func NewPromCollector(cfg *config.Config) (*Collector, error)

NewPromCollector create a new prom collector

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prom.Metric)

Collect returns the current state of the metrics

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prom.Desc)

Describe returns all the descriptions of the collector

type ExecutionIDNotFound

type ExecutionIDNotFound struct {
	Err error
}

ExecutionIDNotFound custom error

func (ExecutionIDNotFound) Error added in v1.0.0

func (e ExecutionIDNotFound) Error() string

type Job

type Job interface {
	Process()
	ID() string
	Node() string
}

Job interface

type Result

type Result struct {
	Value  float64           `json:"value"`
	Labels map[string]string `json:"labels"`
}

Result metrics result

type Results added in v1.0.0

type Results map[string][]Result

func (Results) Validate added in v1.0.0

func (r Results) Validate(cfg *config.Config) error

Jump to

Keyboard shortcuts

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