model

package
v0.3.75-rc-00397cf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateJobInstruction

type CreateJobInstruction struct {
	JobId     string
	Queue     string
	Owner     string
	JobSet    string
	Priority  uint32
	Submitted time.Time
	JobProto  []byte
	State     int64
	Updated   time.Time
}

CreateJobInstruction is an instruction to insert a new row into the jobs table

type CreateJobRunContainerInstruction

type CreateJobRunContainerInstruction struct {
	RunId         string
	ContainerName string
	ExitCode      int32
}

CreateJobRunContainerInstruction is an instruction to create a new entry in the jobRunContainerInstruction table

type CreateJobRunInstruction

type CreateJobRunInstruction struct {
	RunId   string
	JobId   string
	Cluster string
	Created time.Time
}

CreateJobRunInstruction is an instruction to update an existing row in the jobRuns table

type CreateUserAnnotationInstruction

type CreateUserAnnotationInstruction struct {
	JobId string
	Key   string
	Value string
}

CreateUserAnnotationInstruction is an instruction to create a new entry in the UserAnnotationInstruction table

type InstructionSet

type InstructionSet struct {
	JobsToCreate             []*CreateJobInstruction
	JobsToUpdate             []*UpdateJobInstruction
	JobRunsToCreate          []*CreateJobRunInstruction
	JobRunsToUpdate          []*UpdateJobRunInstruction
	UserAnnotationsToCreate  []*CreateUserAnnotationInstruction
	JobRunContainersToCreate []*CreateJobRunContainerInstruction
	MessageIds               []pulsar.MessageID
}

InstructionSet represents a set of instructions to apply to the database. Each type of instruction is stored in its own ordered list representing the order it was received. We also store the original message ids corresponding to these instructions so that when they are saved to the database, we can ACK the corresponding messages.

func (*InstructionSet) GetMessageIDs

func (i *InstructionSet) GetMessageIDs() []pulsar.MessageID

type UpdateJobInstruction

type UpdateJobInstruction struct {
	JobId     string
	Priority  *int32
	State     *int32
	Updated   time.Time
	Cancelled *time.Time
	Duplicate *bool
}

UpdateJobInstruction is an instruction to update an existing row in the jobs table

type UpdateJobRunInstruction

type UpdateJobRunInstruction struct {
	RunId            string
	Node             *string
	Started          *time.Time
	Finished         *time.Time
	Preempted        *time.Time
	Succeeded        *bool
	Error            *string
	PodNumber        *int32
	UnableToSchedule *bool
}

UpdateJobRunInstruction is an instruction to update an existing row in the job runs table

Jump to

Keyboard shortcuts

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