Documentation ¶
Index ¶
- type Application
- func (a *Application) AddClosers(closers ...Closer)
- func (a *Application) AddRunners(runners ...Runner)
- func (a *Application) Close()
- func (a *Application) Config() *config.Config
- func (a *Application) Context() context.Context
- func (a *Application) Logger() *log.Adapter
- func (a *Application) Run() error
- func (a *Application) Shutdown()
- type Closer
- type CloserFunc
- type Config
- type LoggerConfigSupplier
- type Option
- type Runner
- type RunnerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func New ¶
func New(opts ...Option) (*Application, error)
func NewFromConfig ¶
func NewFromConfig(appConfig Config) (*Application, error)
func (*Application) AddClosers ¶
func (a *Application) AddClosers(closers ...Closer)
func (*Application) AddRunners ¶
func (a *Application) AddRunners(runners ...Runner)
func (*Application) Close ¶
func (a *Application) Close()
func (*Application) Config ¶
func (a *Application) Config() *config.Config
func (*Application) Context ¶
func (a *Application) Context() context.Context
func (*Application) Logger ¶
func (a *Application) Logger() *log.Adapter
func (*Application) Run ¶
func (a *Application) Run() error
func (*Application) Shutdown ¶
func (a *Application) Shutdown()
type CloserFunc ¶
type CloserFunc func() error
func (CloserFunc) Close ¶
func (c CloserFunc) Close() error
type Config ¶
type Config struct { LoggerConfigSupplier LoggerConfigSupplier ConfigOptions []config.Option }
func DefaultConfig ¶
func DefaultConfig() *Config
type Option ¶
type Option func(c *Config)
func WithConfigOptions ¶
func WithLoggerConfigSupplier ¶
func WithLoggerConfigSupplier(supplier LoggerConfigSupplier) Option
Click to show internal directories.
Click to hide internal directories.