eventstojobs

package
v0.3.70-rc-14aa097 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventsToJobResponse

func EventsToJobResponse(message api.EventMessage) *js.JobServiceResponse

Translates api.EventMessage to a JobServiceReponse. Nil if api.EventMessage is not a relevant event for JobServiceResponse

func IsEventTerminal

func IsEventTerminal(message api.EventMessage) bool

Check if api.EventMessage is terminal event

func IsStateTerminal

func IsStateTerminal(State js.JobServiceResponse_State) bool

Check if JobServiceResponse is terminal

Types

type EventsToJobService

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

Service that subscribes to events and stores JobStatus in the repository.

func NewEventsToJobService

func NewEventsToJobService(
	queue string,
	jobSetId string,
	eventClient events.JobEventReader,
	jobServiceRepository repository.JobTableUpdater,
) *EventsToJobService

func (*EventsToJobService) SubscribeToJobSetId

func (eventToJobService *EventsToJobService) SubscribeToJobSetId(context context.Context, ttlSecs int64, fromMessageId string) error

Subscribes to a JobSet from jobsetid. Will retry until there is a successful exit, up to the TTL

Jump to

Keyboard shortcuts

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