sdk

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 61 Imported by: 0

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

type SDK struct {
	dig2.SDK
}

SDK wraps the base SDK and provides token platform functionality.

func NewFrom

func NewFrom(sdk dig2.SDK) *SDK

NewFrom wraps an existing SDK with token platform capabilities.

func NewSDK

func NewSDK(registry services.Registry) *SDK

NewSDK creates a new Panurus from a service registry.

func (*SDK) Install

func (p *SDK) Install() error

Install registers all token platform dependencies in the DI container. It skips installation if the token platform is disabled in configuration.

func (*SDK) Start

func (p *SDK) Start(ctx context.Context) error

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

func (p *SDK) Stop() error

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

func (*SDK) TokenEnabled

func (p *SDK) TokenEnabled() bool

TokenEnabled checks if the token platform is enabled in configuration.

Jump to

Keyboard shortcuts

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