lookoutdb

package
v0.3.36 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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 New added in v0.3.36

func New(db *pgxpool.Pool, m *metrics.Metrics) *DB

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 (l *DB) CreateJobRunContainersBatch(ctx context.Context, instructions []*model.CreateJobRunContainerInstruction) error

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 (l *DB) CreateJobRunsBatch(ctx context.Context, instructions []*model.CreateJobRunInstruction) error

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 (l *DB) CreateJobsBatch(ctx context.Context, instructions []*model.CreateJobInstruction) error

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 (l *DB) CreateUserAnnotationsBatch(ctx context.Context, instructions []*model.CreateUserAnnotationInstruction) error

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 (l *DB) UpdateJobRunsBatch(ctx context.Context, instructions []*model.UpdateJobRunInstruction) error

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 (l *DB) UpdateJobsBatch(ctx context.Context, instructions []*model.UpdateJobInstruction) error

func (*DB) UpdateJobsScalar added in v0.3.36

func (l *DB) UpdateJobsScalar(ctx context.Context, instructions []*model.UpdateJobInstruction)

Jump to

Keyboard shortcuts

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