lifecycle

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 14 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 map[string][]Result)
	Config() config.Config
}

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 strunct

func NewPromCollector

func NewPromCollector(namespace string, 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 error

ExecutionIDNotFound custom error

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

Jump to

Keyboard shortcuts

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