Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: MIT Imports: 24 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
}

App provides application container

func NewApp

func NewApp(args []string) *App

NewApp returns new App

func (*App) Close

func (a *App) Close() error

Close implements Closer interface to clean up resources

func (*App) Configuration

func (a *App) Configuration() (*config.Configuration, error)

Configuration returns the current app configuration

func (*App) Container

func (a *App) Container() (*dig.Container, error)

Container returns the current app container populater with dependencies

func (*App) OnClose

func (a *App) OnClose(closer io.Closer)

OnClose adds a closer to be called when application exists

func (*App) Run

func (a *App) Run(startedCh chan<- bool) error

Run the application

func (*App) Server

func (a *App) Server(name string) gserver.GServer

Server returns a running TrustyServer by name

func (*App) WithConfiguration

func (a *App) WithConfiguration(cfg *config.Configuration) *App

WithConfiguration allows to specify a custom configuration, used mainly for testing purposes

func (*App) WithContainerFactory

func (a *App) WithContainerFactory(f appcontainer.ContainerFactoryFn) *App

WithContainerFactory allows to specify an app container factory, used mainly for testing purposes

func (*App) WithSignal

func (a *App) WithSignal(sigs chan os.Signal) *App

WithSignal adds cusom signal channel

Jump to

Keyboard shortcuts

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