testfactory

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package testfactory provides low level helpers for inserting records directly into the database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Job

func Job(ctx context.Context, t *testing.T, exec riverdriver.Executor, opts *JobOpts) *rivertype.JobRow

func Leader

Types

type JobOpts

type JobOpts struct {
	Attempt     *int
	AttemptedAt *time.Time
	CreatedAt   *time.Time
	EncodedArgs []byte
	Errors      [][]byte
	FinalizedAt *time.Time
	Kind        *string
	MaxAttempts *int
	Metadata    []byte
	Priority    *int
	Queue       *string
	ScheduledAt *time.Time
	State       *rivertype.JobState
	Tags        []string
}

type LeaderOpts

type LeaderOpts struct {
	ElectedAt *time.Time
	ExpiresAt *time.Time
	LeaderID  *string
	Name      *string
}

type MigrationOpts

type MigrationOpts struct {
	Version *int
}

Jump to

Keyboard shortcuts

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