reporter

package
v0.4.47 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 19 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) (*armadaevents.EventSequence, error)

func CreateJobFailedEvent

func CreateJobFailedEvent(pod *v1.Pod, reason string, cause armadaevents.KubernetesReason, debugMessage string,
	containerStatuses []*armadaevents.ContainerError, clusterId string,
) (*armadaevents.EventSequence, error)

func CreateJobIngressInfoEvent

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

func CreateJobUnableToScheduleEvent

func CreateJobUnableToScheduleEvent(pod *v1.Pod, reason string, clusterId string) (*armadaevents.EventSequence, error)

func CreateJobUtilisationEvent

func CreateJobUtilisationEvent(pod *v1.Pod, utilisationData *domain.UtilisationData, clusterId string) (*armadaevents.EventSequence, error)

func CreateMinimalJobFailedEvent added in v0.4.36

func CreateMinimalJobFailedEvent(jobIdStr string, runIdStr string, jobSet string, queue string, clusterId string, message string) (*armadaevents.EventSequence, error)

func CreateReturnLeaseEvent added in v0.3.47

func CreateReturnLeaseEvent(pod *v1.Pod, reason string, debugMessage string, clusterId string, runAttempted bool) (*armadaevents.EventSequence, error)

func CreateSimpleJobFailedEvent

func CreateSimpleJobFailedEvent(pod *v1.Pod, reason string, debugMessage string, clusterId string, cause armadaevents.KubernetesReason) (*armadaevents.EventSequence, error)

func CreateSimpleJobPreemptedEvent added in v0.3.57

func CreateSimpleJobPreemptedEvent(pod *v1.Pod) (*armadaevents.EventSequence, error)

Types

type EventMessage added in v0.3.47

type EventMessage struct {
	Event    *armadaevents.EventSequence
	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,
	clock clock.Clock,
	maxBatchSize int,
) (*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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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