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
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.