Help us shape the future of Go! Take the 2026 Go Developer Survey

maintenance

package
v1.21.2 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package maintenance holds the queue handlers of the maintenance tasks: the quota grants administrators schedule and the daily exchange-rate refresh.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuotaTaskHandler added in v1.21.0

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

QuotaTaskHandler is the queue shell of the quota grants administrators schedule; the grants themselves are the subscription module's. The last failed attempt marks the task failed in the platform kernel's task bookkeeping, so the administrator sees why it stopped.

func NewQuotaTaskHandler added in v1.21.0

func NewQuotaTaskHandler(service subscription.Service, tasks repository.TaskRepo) *QuotaTaskHandler

NewQuotaTaskHandler builds the shell over the subscription facade and the task bookkeeping.

func (*QuotaTaskHandler) ProcessTask added in v1.21.0

func (h *QuotaTaskHandler) ProcessTask(ctx context.Context, t *asynq.Task) error

type RateDependencies

type RateDependencies struct {
	System       repository.SystemRepo
	ExchangeRate *billing.CurrencyRateCache
}

RateDependencies are the exchange-rate refresh's: the currency settings in the system settings (the platform kernel's) and the rate cache.

type RateHandler added in v1.21.0

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

RateHandler refreshes billing's cached exchange rate from the site currency to CNY. Without an exchange-rate API key there is nothing to refresh, and the cache keeps its current rate.

func NewRateHandler added in v1.21.0

func NewRateHandler(deps RateDependencies) *RateHandler

NewRateHandler builds the refresh over the currency settings and billing's rate cache.

func (*RateHandler) ProcessTask added in v1.21.0

func (h *RateHandler) ProcessTask(ctx context.Context, _ *asynq.Task) error

Jump to

Keyboard shortcuts

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