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 EncoderType
- type LogConfig
- 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 ¶ added in v1.4.0
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 ¶ added in v1.4.0
func (a *Application) Close()
func (*Application) Config ¶ added in v1.4.0
func (a *Application) Config() *config.Config
func (*Application) Context ¶
func (a *Application) Context() context.Context
func (*Application) Logger ¶ added in v1.4.0
func (a *Application) Logger() *log.Adapter
func (*Application) Run ¶
func (a *Application) Run() error
func (*Application) Shutdown ¶
func (a *Application) Shutdown()
type CloserFunc ¶
type Config ¶ added in v1.4.0
type Config struct {
ConfigOptions []config.Option
LoggerConfigSupplier LoggerConfigSupplier
}
func DefaultConfig ¶ added in v1.4.0
func DefaultConfig() *Config
type EncoderType ¶ added in v1.6.3
type EncoderType string
const ( JsonEncoderType EncoderType = "json" PlainTextEncoderType EncoderType = "plain-text" )
type LogConfig ¶ added in v1.6.3
type LogConfig struct {
FileOutput *file.Config
EncoderType EncoderType
DeduplicateFields bool
}
type LoggerConfigSupplier ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.