eventutil

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiJobFromLogSubmitJob

func ApiJobFromLogSubmitJob(ownerId string, groups []string, queueName string, jobSetName string, time time.Time, e *armadaevents.SubmitJob) (*api.Job, error)

ApiJobFromLogSubmitJob converts a SubmitJob log message into an api.Job struct, which is used by Armada internally.

func CompactEventSequences

func CompactEventSequences(sequences []*armadaevents.EventSequence) []*armadaevents.EventSequence

CompactEventSequences converts a []*armadaevents.EventSequence into a []*armadaevents.EventSequence of minimal length. In particular, it moves events with equal (queue, jobSetName, userId, groups) into a single sequence when doing so is possible without changing the order of events within job sets.

For example, three sequences [A, B, C], [D, E], [F, G] could result in the following two sequences [A, B, C, F, G], [D, E], if sequence 1 and 3 share the same (queue, jobSetName, userId, groups) and if the sequence [D, E] is for a different job set.

func K8sObjectMetaFromLogObjectMeta

func K8sObjectMetaFromLogObjectMeta(meta *armadaevents.ObjectMeta) *metav1.ObjectMeta

func LimitSequenceByteSize

func LimitSequenceByteSize(sequence *armadaevents.EventSequence, sizeInBytes uint, strict bool) ([]*armadaevents.EventSequence, error)

LimitSequenceByteSize returns a slice of sequences produced by breaking up sequence.Events into separate sequences If strict is true, each sequence will be at most sizeInBytes bytes in size If strict is false, sizeInBytes can be exceeded by at most the size of a single sequence.Event

func LimitSequencesByteSize

func LimitSequencesByteSize(sequences []*armadaevents.EventSequence, sizeInBytes uint, strict bool) ([]*armadaevents.EventSequence, error)

LimitSequencesByteSize calls LimitSequenceByteSize for each of the provided sequences and returns all resulting sequences.

func LimitSequencesEventMessageCount added in v0.8.3

func LimitSequencesEventMessageCount(sequences []*armadaevents.EventSequence, maxEventsPerSequence int) []*armadaevents.EventSequence

func ShortSequenceString

func ShortSequenceString(sequence *armadaevents.EventSequence) string

ShortSequenceString returns a short string representation of an events sequence. To be used for logging, for example.

func UnmarshalEventSequence

func UnmarshalEventSequence(ctx *armadacontext.Context, payload []byte) (*armadaevents.EventSequence, error)

UnmarshalEventSequence returns an EventSequence object contained in a byte buffer after validating that the resulting EventSequence is valid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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