app

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Core    CoreModule
	Project ProjectModule
	Server  ServerModule
	Memory  *memory.Service
	Ctx     context.Context
	Cancel  context.CancelFunc
}

App holds the core components of the application with better separation of concerns.

func NewApp

func NewApp() (*App, error)

NewApp initializes and returns a new App instance.

func (*App) Close

func (a *App) Close()

Close gracefully shuts down the application resources.

func (*App) ContextWithLogger

func (a *App) ContextWithLogger(ctx context.Context) context.Context

ContextWithLogger returns a new context with the application's logger.

func (*App) LoggerFromContext

func (a *App) LoggerFromContext(ctx context.Context) *zap.Logger

LoggerFromContext retrieves the logger from the given context, or returns the default app logger.

type CoreModule

type CoreModule struct {
	Config *config.Config
	Logger *zap.Logger
	DB     *storage.DB
}

CoreModule holds the core application components

type ProjectModule

type ProjectModule struct {
	Path string
	ID   string
}

ProjectModule holds project-specific information

type ServerModule

type ServerModule struct {
	Mode doctor.ServerMode
}

ServerModule holds server-specific information

Jump to

Keyboard shortcuts

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