billingworker

package
v1.0.0-beta.228 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 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 Worker

type Worker struct {
	// contains filtered or unexported fields
}

func New

func New(opts WorkerOptions) (*Worker, error)

func (*Worker) AddHandler

func (w *Worker) AddHandler(handler grouphandler.GroupEventHandler)

AddHandler adds an additional handler to the list of event handlers. Handlers are called in the order they are added and run after the built in handlers. In the case of any handler returning an error, the event will be retried so it is important that all handlers are idempotent.

func (*Worker) Close

func (w *Worker) Close() error

func (*Worker) Run

func (w *Worker) Run(ctx context.Context) error

type WorkerOptions

type WorkerOptions struct {
	SystemEventsTopic string

	Router   router.Options
	EventBus eventbus.Publisher

	Logger *slog.Logger

	BillingService          billing.Service
	BillingSubscriptionSync subscriptionsync.Service
	// ChargesService is optional; when non-nil the worker handles AdvanceChargesEvent.
	ChargesService charges.ChargeService

	SubscriptionService subscription.Service
	LockdownNamespaces  []string
}

func (WorkerOptions) Validate

func (w WorkerOptions) Validate() error

Jump to

Keyboard shortcuts

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