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 ¶
func (a *AuditorCheckServiceProvider) CheckService(id token.TMSID, adb *auditdb.StoreService, tdb *tokens.Service) (auditor.CheckService, error)
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
func (a *AuditorCheckServiceProvider) Stop() error
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 ¶
func (a *OwnerCheckServiceProvider) CheckService(id token.TMSID, txdb *ttxdb.StoreService, tdb *tokens.Service) (ttx.CheckService, error)
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.