app

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 20 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustLoadConfigInto added in v0.3.1

func MustLoadConfigInto[T any](ctx context.Context, into T) (context.Context, T)

Used to unmarshal config and environment into a custom type that overloads *config.AppConfig. Will perform normal env substitutions for AppConfig, but env overrides for custom type are up to the caller.

func MustSetupConfigAndLogging

func MustSetupConfigAndLogging(ctx context.Context) context.Context

Helper function to return a context loaded up with config.AppConfig and a logger

func MustSetupConfigAndLoggingInto added in v0.3.1

func MustSetupConfigAndLoggingInto[T any](ctx context.Context, into T) (context.Context, T)

Unmarshal config into a custom type Type MUST include *config.AppConfig Stored in context as *config.AppConfig but can be asserted back

Types

type App

type App struct {
	AppContext context.Context
	HTTP       *httpopts.AppHTTP
	GRPC       *grpcopts.AppGRPC
	// contains filtered or unexported fields
}

func (*App) Done

func (a *App) Done() <-chan any

func (*App) MustRun

func (a *App) MustRun()

func (*App) Shutdown

func (a *App) Shutdown()

Typically invoked when AppContext is done or Server has exited. Not intended to be called manually

Jump to

Keyboard shortcuts

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