Documentation
¶
Index ¶
- type DB
- func (l *DB) CreateJobRunContainers(ctx context.Context, instructions []*model.CreateJobRunContainerInstruction)
- func (l *DB) CreateJobRunContainersBatch(ctx context.Context, instructions []*model.CreateJobRunContainerInstruction) error
- func (l *DB) CreateJobRunContainersScalar(ctx context.Context, instructions []*model.CreateJobRunContainerInstruction)
- func (l *DB) CreateJobRuns(ctx context.Context, instructions []*model.CreateJobRunInstruction)
- func (l *DB) CreateJobRunsBatch(ctx context.Context, instructions []*model.CreateJobRunInstruction) error
- func (l *DB) CreateJobRunsScalar(ctx context.Context, instructions []*model.CreateJobRunInstruction)
- func (l *DB) CreateJobs(ctx context.Context, instructions []*model.CreateJobInstruction)
- func (l *DB) CreateJobsBatch(ctx context.Context, instructions []*model.CreateJobInstruction) error
- func (l *DB) CreateJobsScalar(ctx context.Context, instructions []*model.CreateJobInstruction)
- func (l *DB) CreateUserAnnotations(ctx context.Context, instructions []*model.CreateUserAnnotationInstruction)
- func (l *DB) CreateUserAnnotationsBatch(ctx context.Context, instructions []*model.CreateUserAnnotationInstruction) error
- func (l *DB) CreateUserAnnotationsScalar(ctx context.Context, instructions []*model.CreateUserAnnotationInstruction)
- func (l *DB) ProcessUpdates(ctx context.Context, db *pgxpool.Pool, msgs chan *model.InstructionSet, ...) chan []*pulsarutils.ConsumerMessageId
- func (l *DB) Update(ctx context.Context, instructions *model.InstructionSet)
- func (l *DB) UpdateJobRuns(ctx context.Context, instructions []*model.UpdateJobRunInstruction)
- func (l *DB) UpdateJobRunsBatch(ctx context.Context, instructions []*model.UpdateJobRunInstruction) error
- func (l *DB) UpdateJobRunsScalar(ctx context.Context, instructions []*model.UpdateJobRunInstruction)
- func (l *DB) UpdateJobs(ctx context.Context, instructions []*model.UpdateJobInstruction)
- func (l *DB) UpdateJobsBatch(ctx context.Context, instructions []*model.UpdateJobInstruction) error
- func (l *DB) UpdateJobsScalar(ctx context.Context, instructions []*model.UpdateJobInstruction)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶ added in v0.3.36
type DB struct {
// contains filtered or unexported fields
}
func (*DB) CreateJobRunContainers ¶ added in v0.3.36
func (l *DB) CreateJobRunContainers(ctx context.Context, instructions []*model.CreateJobRunContainerInstruction)
func (*DB) CreateJobRunContainersBatch ¶ added in v0.3.36
func (*DB) CreateJobRunContainersScalar ¶ added in v0.3.36
func (l *DB) CreateJobRunContainersScalar(ctx context.Context, instructions []*model.CreateJobRunContainerInstruction)
func (*DB) CreateJobRuns ¶ added in v0.3.36
func (l *DB) CreateJobRuns(ctx context.Context, instructions []*model.CreateJobRunInstruction)
func (*DB) CreateJobRunsBatch ¶ added in v0.3.36
func (*DB) CreateJobRunsScalar ¶ added in v0.3.36
func (l *DB) CreateJobRunsScalar(ctx context.Context, instructions []*model.CreateJobRunInstruction)
func (*DB) CreateJobs ¶ added in v0.3.36
func (l *DB) CreateJobs(ctx context.Context, instructions []*model.CreateJobInstruction)
func (*DB) CreateJobsBatch ¶ added in v0.3.36
func (*DB) CreateJobsScalar ¶ added in v0.3.36
func (l *DB) CreateJobsScalar(ctx context.Context, instructions []*model.CreateJobInstruction)
CreateJobsScalar will insert jobs one by one into the database
func (*DB) CreateUserAnnotations ¶ added in v0.3.36
func (l *DB) CreateUserAnnotations(ctx context.Context, instructions []*model.CreateUserAnnotationInstruction)
func (*DB) CreateUserAnnotationsBatch ¶ added in v0.3.36
func (*DB) CreateUserAnnotationsScalar ¶ added in v0.3.36
func (l *DB) CreateUserAnnotationsScalar(ctx context.Context, instructions []*model.CreateUserAnnotationInstruction)
func (*DB) ProcessUpdates ¶ added in v0.3.36
func (l *DB) ProcessUpdates(ctx context.Context, db *pgxpool.Pool, msgs chan *model.InstructionSet, bufferSize int) chan []*pulsarutils.ConsumerMessageId
ProcessUpdates will update the lookout database according to the incoming channel of instructions. It returns a channel containing all the message ids that have been successfully processed.
func (*DB) Update ¶ added in v0.3.36
func (l *DB) Update(ctx context.Context, instructions *model.InstructionSet)
Update updates the lookout database according to the supplied InstructionSet. The updates are applied in the following order: * New Job Creations * Job Updates, New Job Creations, New User Annotations * Job Run Updates, New Job Containers In each case we first try to bach insert the rows using the postgres copy protocol. If this fails then we try a slower, serial insert and discard any rows that cannot be inserted.
func (*DB) UpdateJobRuns ¶ added in v0.3.36
func (l *DB) UpdateJobRuns(ctx context.Context, instructions []*model.UpdateJobRunInstruction)
func (*DB) UpdateJobRunsBatch ¶ added in v0.3.36
func (*DB) UpdateJobRunsScalar ¶ added in v0.3.36
func (l *DB) UpdateJobRunsScalar(ctx context.Context, instructions []*model.UpdateJobRunInstruction)
func (*DB) UpdateJobs ¶ added in v0.3.36
func (l *DB) UpdateJobs(ctx context.Context, instructions []*model.UpdateJobInstruction)
func (*DB) UpdateJobsBatch ¶ added in v0.3.36
func (*DB) UpdateJobsScalar ¶ added in v0.3.36
func (l *DB) UpdateJobsScalar(ctx context.Context, instructions []*model.UpdateJobInstruction)