reporter

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEventForCurrentState

func CreateEventForCurrentState(pod *v1.Pod, clusterId string) (api.Event, error)

func CreateJobFailedEvent

func CreateJobFailedEvent(pod *v1.Pod, reason string, exitCodes map[string]int32, clusterId string) api.Event

func CreateJobLeaseReturnedEvent

func CreateJobLeaseReturnedEvent(pod *v1.Pod, reason string, clusterId string) api.Event

func CreateJobUnableToScheduleEvent

func CreateJobUnableToScheduleEvent(pod *v1.Pod, reason string, clusterId string) api.Event

func CreateJobUtilisationEvent added in v0.1.9

func CreateJobUtilisationEvent(pod *v1.Pod, maxResources common.ComputeResources, clusterId string) api.Event

func HasCurrentStateBeenReported

func HasCurrentStateBeenReported(pod *v1.Pod) bool

func HasPodBeenInStateForLongerThanGivenDuration

func HasPodBeenInStateForLongerThanGivenDuration(pod *v1.Pod, duration time.Duration) bool

Types

type EventReporter

type EventReporter interface {
	Report(event api.Event) error
	QueueEvent(event api.Event, callback func(error))
}

type JobEventReporter

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

func NewJobEventReporter

func NewJobEventReporter(clusterContext clusterContext.ClusterContext, eventClient api.EventClient) (*JobEventReporter, chan bool)

func (*JobEventReporter) QueueEvent added in v0.1.9

func (eventReporter *JobEventReporter) QueueEvent(event api.Event, callback func(error))

func (*JobEventReporter) Report

func (eventReporter *JobEventReporter) Report(event api.Event) error

func (*JobEventReporter) ReportMissingJobEvents

func (eventReporter *JobEventReporter) ReportMissingJobEvents()

Jump to

Keyboard shortcuts

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