db

package
v0.24.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditorCheckServiceProvider

type AuditorCheckServiceProvider struct {

	// MaxPageSize is the storage layer's configured max read page size, passed to
	// the default checkers so they page within the guard layer's cap. 0 means the
	// built-in default is used.
	MaxPageSize int
	// contains filtered or unexported fields
}

AuditorCheckServiceProvider creates check services for auditors. It combines default checkers with custom checkers for database validation.

func NewAuditorCheckServiceProvider

func NewAuditorCheckServiceProvider(
	tmsProvider common.TokenManagementServiceProvider,
	networkProvider common.NetworkProvider,
	checkers []common.NamedChecker,
	configuration checks.Configuration,
	metricsProvider metrics.Provider,
) *AuditorCheckServiceProvider

NewAuditorCheckServiceProvider creates a new auditor check service provider.

A nil configuration means no background sweep is started and only the on-demand checks are available.

func (*AuditorCheckServiceProvider) CheckService

CheckService creates a check service for the given TMS ID and databases, and starts the background drift sweep over the audit store. It combines default checkers with custom checkers provided during initialization.

A failure to start the background sweep is logged rather than returned: the sweep is a safety net on top of the on-demand checks below, not a precondition for them, so a bad checks config or a store that briefly can't take leadership must not stop the auditor service itself from being built.

func (*AuditorCheckServiceProvider) Stop added in v0.24.0

Stop stops the background drift sweeps this provider started.

type OwnerCheckServiceProvider

type OwnerCheckServiceProvider struct {

	// MaxPageSize is the storage layer's configured max read page size, passed to
	// the default checkers so they page within the guard layer's cap. 0 means the
	// built-in default is used.
	MaxPageSize int
	// contains filtered or unexported fields
}

OwnerCheckServiceProvider creates check services for token owners. It combines default checkers with custom checkers for database validation.

func NewOwnerCheckServiceProvider

func NewOwnerCheckServiceProvider(
	tmsProvider common.TokenManagementServiceProvider,
	networkProvider common.NetworkProvider,
	checkers []common.NamedChecker,
	configuration checks.Configuration,
	metricsProvider metrics.Provider,
) *OwnerCheckServiceProvider

NewOwnerCheckServiceProvider creates a new owner check service provider.

A nil configuration means no background sweep is started and only the on-demand checks are available.

func (*OwnerCheckServiceProvider) CheckService

CheckService creates a check service for the given TMS ID and databases, and starts the background drift sweep over the owner's transaction store. It combines default checkers with custom checkers provided during initialization.

A failure to start the background sweep is logged rather than returned: the sweep is a safety net on top of the on-demand checks below, not a precondition for them, so a bad checks config or a store that briefly can't take leadership must not stop the owner service itself from being built.

func (*OwnerCheckServiceProvider) Stop added in v0.24.0

func (a *OwnerCheckServiceProvider) Stop() error

Stop stops the background drift sweeps this provider started.

Jump to

Keyboard shortcuts

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