reporter

package
v0.3.75-rc-bfcba91 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: Apache-2.0 Imports: 20 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, cause api.Cause, containerStatuses []*api.ContainerStatus,
	exitCodes map[string]int32, clusterId string,
) api.Event

func CreateJobIngressInfoEvent

func CreateJobIngressInfoEvent(pod *v1.Pod, clusterId string, associatedServices []*v1.Service, associatedIngresses []*networking.Ingress) (api.Event, error)

func CreateJobPreemptedEvent

func CreateJobPreemptedEvent(clusterEvent *v1.Event, clusterId string) (event *api.JobPreemptedEvent, err error)

func CreateJobTerminatedEvent

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

func CreateJobUnableToScheduleEvent

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

func CreateJobUtilisationEvent

func CreateJobUtilisationEvent(pod *v1.Pod, utilisationData *domain.UtilisationData, clusterId string) api.Event

func CreateReturnLeaseEvent added in v0.3.47

func CreateReturnLeaseEvent(pod *v1.Pod, reason string, clusterId string, runAttempted bool) api.Event

func CreateSimpleJobFailedEvent

func CreateSimpleJobFailedEvent(pod *v1.Pod, reason string, clusterId string, cause api.Cause) api.Event

func CreateSimpleJobPreemptedEvent added in v0.3.57

func CreateSimpleJobPreemptedEvent(pod *v1.Pod, clusterId string) *api.JobPreemptedEvent

Types

type EventMessage added in v0.3.47

type EventMessage struct {
	Event    api.Event
	JobRunId string
}

type EventReporter

type EventReporter interface {
	Report(events []EventMessage) error
	QueueEvent(event EventMessage, callback func(error))
}

type EventSender added in v0.3.47

type EventSender interface {
	SendEvents(events []EventMessage) error
}

type ExecutorApiEventSender added in v0.3.47

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

func NewExecutorApiEventSender added in v0.3.47

func NewExecutorApiEventSender(
	executorApiClient executorapi.ExecutorApiClient,
	maxMessageSize int,
) *ExecutorApiEventSender

func (*ExecutorApiEventSender) SendEvents added in v0.3.47

func (eventSender *ExecutorApiEventSender) SendEvents(events []EventMessage) error

type JobEventReporter

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

func NewJobEventReporter

func NewJobEventReporter(clusterContext clusterContext.ClusterContext, jobRunState *job.JobRunStateStore, eventSender EventSender) (*JobEventReporter, chan bool)

func (*JobEventReporter) QueueEvent

func (eventReporter *JobEventReporter) QueueEvent(event EventMessage, callback func(error))

func (*JobEventReporter) Report

func (eventReporter *JobEventReporter) Report(events []EventMessage) error

func (*JobEventReporter) ReportMissingJobEvents

func (eventReporter *JobEventReporter) ReportMissingJobEvents()

type LegacyApiEventSender added in v0.3.47

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

func NewLegacyApiEventSender added in v0.3.47

func NewLegacyApiEventSender(eventClient api.EventClient) *LegacyApiEventSender

func (*LegacyApiEventSender) SendEvents added in v0.3.47

func (eventSender *LegacyApiEventSender) SendEvents(events []EventMessage) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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