provider

package
v0.0.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package provider is the default hex/queue service provider.

v1 supports the in-process memory backend out of the box. Consumers wanting sqlite/redis/sqs/etc. supply a Backend function that constructs the queue.Queue implementation of their choice — the framework does not import driver packages here to keep the dependency footprint minimal (matches ADR-0004's pattern for db).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	provider.Base

	// Binding is the container name. Defaults to "queue".
	Binding string

	// Backend, when set, returns the concrete queue implementation.
	// When nil, the memory backend is used (fine for tests and
	// single-process deployments; not durable).
	Backend func() queue.Queue
	// contains filtered or unexported fields
}

Provider wires a queue.Queue into the container.

func (*Provider) Register

func (p *Provider) Register(app provider.Application) error

Register constructs the queue and binds it.

func (*Provider) Shutdown

func (p *Provider) Shutdown(ctx context.Context, app provider.Application) error

Shutdown closes the queue (drains subscribers, waits for in-flight handlers up to ctx).

Jump to

Keyboard shortcuts

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