testenv

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BackendNull       = "null"
	BackendSync       = "sync"
	BackendWorkerpool = "workerpool"
	BackendSQLite     = "sqlite"
	BackendRedis      = "redis"
	BackendMySQL      = "mysql"
	BackendPostgres   = "postgres"
	BackendNATS       = "nats"
	BackendSQS        = "sqs"
	BackendRabbitMQ   = "rabbitmq"
)

Variables

Functions

func BackendEnabled

func BackendEnabled(envValue, name string) bool

func MySQLDSN

func MySQLDSN(addr string) string

func NewQueue

func NewQueue(cfg any, opts ...queue.Option) (*queue.Queue, error)

func PostgresDSN

func PostgresDSN(addr string) string

func SelectedBackends

func SelectedBackends(envValue string) map[string]bool

SelectedBackends returns the enabled backend set for INTEGRATION_BACKEND. When unset or "all", all known backends are enabled.

Types

type Runtime

type Runtime interface {
	Driver() queue.Driver
	Dispatch(job any) error
	DispatchCtx(ctx context.Context, job any) error
	Register(jobType string, handler queue.Handler)
	StartWorkers(ctx context.Context) error
	Shutdown(ctx context.Context) error
}

func NewQueueRuntime

func NewQueueRuntime(cfg any) (Runtime, error)

func WithWorkers

func WithWorkers(r Runtime, count int) Runtime

Jump to

Keyboard shortcuts

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