Documentation
¶
Index ¶
Constants ¶
View Source
const ApplicationName = "ledger"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
EnvName string `env:"ENV_NAME"`
LogLevel string `env:"LOG_LEVEL"`
Version string `env:"VERSION"`
// OpenTelemetry configuration
OtelServiceName string `env:"OTEL_RESOURCE_SERVICE_NAME"`
OtelLibraryName string `env:"OTEL_LIBRARY_NAME"`
OtelServiceVersion string `env:"OTEL_RESOURCE_SERVICE_VERSION"`
OtelDeploymentEnv string `env:"OTEL_RESOURCE_DEPLOYMENT_ENVIRONMENT"`
OtelColExporterEndpoint string `env:"OTEL_EXPORTER_OTLP_ENDPOINT"`
EnableTelemetry bool `env:"ENABLE_TELEMETRY"`
}
Config is the top level configuration struct for the unified ledger component.
type Options ¶
type Options struct {
// Logger allows callers to provide a pre-configured logger, avoiding multiple
// initializations when composing components (e.g. unified ledger).
Logger libLog.Logger
}
Options contains optional dependencies that can be injected by callers.
type Service ¶
type Service struct {
OnboardingService mbootstrap.Service
TransactionService transaction.TransactionService
Logger libLog.Logger
Telemetry *libOpentelemetry.Telemetry
}
Service is the unified ledger service that composes onboarding and transaction.
func InitServers ¶
InitServers initializes the unified ledger service that composes both onboarding and transaction modules in a single process. The transaction module is initialized first so its BalancePort (the UseCase) can be passed directly to onboarding for in-process calls.
func InitServersWithOptions ¶
InitServersWithOptions initializes the unified ledger service with optional dependency injection.
Click to show internal directories.
Click to hide internal directories.