appx

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2026 License: MIT Imports: 3 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 {
	// contains filtered or unexported fields
}

func New

func New(log *slog.Logger, runners ...Runner) *App

func (*App) Run

func (a *App) Run(ctx context.Context) error

type Config

type Config struct {
	Mode   string // Application mode: development, staging, production
	Domain string // Public-facing domain, e.g., example.com
}

Config holds basic environment configuration like mode and domain.

func NewConfig

func NewConfig(mode, domain string) *Config

func (*Config) WithDomain

func (c *Config) WithDomain(domain string) *Config

WithDomain sets the domain and returns the updated Config.

func (*Config) WithMode

func (c *Config) WithMode(mode string) *Config

WithMode sets the mode and returns the updated Config.

type Runner

type Runner interface {
	Start(ctx context.Context) error
	Shutdown(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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