model

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 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
	Namespace                 string
	JobSet                    string
	Cpu                       int64
	Memory                    int64
	EphemeralStorage          int64
	Gpu                       int64
	Priority                  int64
	Submitted                 time.Time
	State                     int32
	LastTransitionTime        time.Time
	LastTransitionTimeSeconds int64
	JobProto                  []byte
	PriorityClass             *string
}

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

type CreateJobRunInstruction

type CreateJobRunInstruction struct {
	RunId       string
	JobId       string
	Cluster     string
	Node        *string
	Leased      *time.Time
	Pending     *time.Time
	JobRunState int32
}

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

type CreateUserAnnotationInstruction

type CreateUserAnnotationInstruction struct {
	JobId  string
	Key    string
	Value  string
	Queue  string
	Jobset 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
	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 representign 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                  *int64
	State                     *int32
	Cancelled                 *time.Time
	CancelReason              *string
	LastTransitionTime        *time.Time
	LastTransitionTimeSeconds *int64
	Duplicate                 *bool
	LatestRunId               *string
}

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

type UpdateJobRunInstruction

type UpdateJobRunInstruction struct {
	RunId       string
	Node        *string
	Pending     *time.Time
	Started     *time.Time
	Finished    *time.Time
	JobRunState *int32
	Error       []byte
	ExitCode    *int32
}

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