tms

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter[E any](in []E, keep func(E) bool) []E

Filter keeps elements where keep(x) == true, allocating a new result slice. This is a generic utility function for filtering slices.

func NewTMSNormalizer

func NewTMSNormalizer(tmsProvider ConfigService, normalizer token.Normalizer) *tmsNormalizer

NewTMSNormalizer creates a new TMS normalizer.

Types

type ConfigService

type ConfigService interface {
	Configurations() ([]driver.Configuration, error)
}

ConfigService provides access to TMS configurations.

type ConfigServiceWrapper

type ConfigServiceWrapper struct {
	*config.Service
}

ConfigServiceWrapper wraps the config service to provide driver.Configuration interface.

func NewConfigServiceWrapper

func NewConfigServiceWrapper(service *config.Service) *ConfigServiceWrapper

NewConfigServiceWrapper creates a new config service wrapper.

func (*ConfigServiceWrapper) ConfigurationFor

func (c *ConfigServiceWrapper) ConfigurationFor(network string, channel string, namespace string) (driver.Configuration, error)

ConfigurationFor returns the configuration for the specified network, channel, and namespace.

func (*ConfigServiceWrapper) Configurations

func (c *ConfigServiceWrapper) Configurations() ([]driver.Configuration, error)

Configurations returns all TMS configurations as driver.Configuration interfaces.

type PostInitializer

type PostInitializer struct {
	// contains filtered or unexported fields
}

PostInitializer performs post-initialization tasks for TMS instances. It restores databases and configures supported token formats.

func NewPostInitializer

func NewPostInitializer(tokensProvider *tokens2.ServiceManager, networkProvider *network.Provider, ownerManager *ttx.ServiceManager, auditorManager *auditor.ServiceManager) (*PostInitializer, error)

NewPostInitializer creates a new post-initializer with the required service managers.

func (*PostInitializer) PostInit

func (p *PostInitializer) PostInit(tms driver.TokenManagerService, networkID, channel, namespace string) error

PostInit performs initialization tasks after a TMS is created. It restores owner and auditor databases and sets supported token formats.

Jump to

Keyboard shortcuts

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