bootstrap

package
v3.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	EnvName                 string `env:"ENV_NAME"`
	ProtoAddress            string `env:"PROTO_ADDRESS"`
	ServerAddress           string `env:"SERVER_ADDRESS"`
	LogLevel                string `env:"LOG_LEVEL"`
	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"`
	MongoURI                string `env:"MONGO_URI"`
	MongoDBHost             string `env:"MONGO_HOST"`
	MongoDBName             string `env:"MONGO_NAME"`
	MongoDBUser             string `env:"MONGO_USER"`
	MongoDBPassword         string `env:"MONGO_PASSWORD"`
	MongoDBPort             string `env:"MONGO_PORT"`
	MongoDBParameters       string `env:"MONGO_PARAMETERS"`
	MaxPoolSize             int    `env:"MONGO_MAX_POOL_SIZE"`
	HashSecretKey           string `env:"LCRYPTO_HASH_SECRET_KEY"`
	EncryptSecretKey        string `env:"LCRYPTO_ENCRYPT_SECRET_KEY"`
	AuthAddress             string `env:"PLUGIN_AUTH_ADDRESS"`
	AuthEnabled             bool   `env:"PLUGIN_AUTH_ENABLED"`
}

Config is the top level configuration struct for the entire application.

type Server

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

Server represents the http server for Ledger services.

func NewServer

func NewServer(cfg *Config, app *fiber.App, logger libCommonsLog.Logger, telemetry *libCommonsOtel.Telemetry) *Server

NewServer creates an instance of Server.

func (*Server) Run

func (s *Server) Run(l *libCommons.Launcher) error

Run runs the server.

func (*Server) ServerAddress

func (s *Server) ServerAddress() string

ServerAddress returns is a convenience method to return the server address.

type Service

type Service struct {
	*Server
	libLog.Logger
}

Service is the application glue where we put all top level components to be used.

func InitServers

func InitServers() *Service

InitServers initiate http and grpc servers.

func (*Service) Run

func (app *Service) Run()

Run starts the application. This is the only necessary code to run an app in main.go

Jump to

Keyboard shortcuts

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