application

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package application provides application lifecycle management. It handles initialization, configuration, and graceful shutdown of all application components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name         string
	Logger       *logger.Logger
	Server       *handlers.Server
	Config       *config.Service
	Database     *database.Database
	Cache        *cache.Cache
	Tracer       *tracesdk.TracerProvider
	ShutdownChan chan os.Signal
}

Application represents the main application instance

func NewApplication

func NewApplication() *Application

NewApplication creates a new application instance

func (*Application) GetCache

func (app *Application) GetCache() *cache.Cache

GetCache returns the cache instance

func (*Application) GetConfig

func (app *Application) GetConfig() *config.Service

GetConfig returns the application configuration

func (*Application) GetDatabase

func (app *Application) GetDatabase() *database.Database

GetDatabase returns the database instance

func (*Application) GetLogger

func (app *Application) GetLogger() *logger.Logger

GetLogger returns the application logger

func (*Application) GetServer

func (app *Application) GetServer() *handlers.Server

GetServer returns the HTTP server instance

func (*Application) Initialize

func (app *Application) Initialize() error

Initialize sets up all application components

func (*Application) Run

func (app *Application) Run() error

Run starts the application and handles graceful shutdown

func (*Application) Shutdown

func (app *Application) Shutdown() error

Shutdown gracefully shuts down all application components

Jump to

Keyboard shortcuts

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