Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuditorCheckServiceProvider ¶
func NewAuditorCheckServiceProvider(in struct {
dig.In
TMSProvider common.TokenManagementServiceProvider
NetworkProvider common.NetworkProvider
Configuration checks.Configuration
MetricsProvider metrics.Provider
Checkers []common.NamedChecker `group:"auditdb-checkers"`
Policy guard.Policy
}) *db.AuditorCheckServiceProvider
NewAuditorCheckServiceProvider creates an auditor check service provider using dependency injection. It aggregates TMS provider, network provider, and custom checkers from the DI container.
func NewOwnerCheckServiceProvider ¶
func NewOwnerCheckServiceProvider(in struct {
dig.In
TMSProvider common.TokenManagementServiceProvider
NetworkProvider common.NetworkProvider
Configuration checks.Configuration
MetricsProvider metrics.Provider
Checkers []common.NamedChecker `group:"ttxdb-checkers"`
Policy guard.Policy
}) *db.OwnerCheckServiceProvider
NewOwnerCheckServiceProvider creates an owner check service provider using dependency injection. It aggregates TMS provider, network provider, and custom checkers from the DI container.
Types ¶
type SDK ¶
SDK wraps the base SDK and provides token platform functionality.
func (*SDK) Install ¶
Install registers all token platform dependencies in the DI container. It skips installation if the token platform is disabled in configuration.
func (*SDK) Start ¶
Start initializes and starts the token platform services. It skips startup if the token platform is disabled in configuration.
func (*SDK) Stop ¶ added in v0.24.0
Stop stops the token platform services, including the background ledger drift checks sweeps started as a side effect of building each TMS's check service in Start, and the connection-pool metrics sampler, before stopping the underlying SDK.
Without this, a running sweep - and on Postgres its dedicated advisory-lock connection - outlives an in-process SDK restart: the old sweep keeps holding the lock and the new one never acquires leadership. The sampler's goroutine would leak the same way.
func (*SDK) TokenEnabled ¶
TokenEnabled checks if the token platform is enabled in configuration.