Documentation ¶
Index ¶
- Variables
- func IsSet(key string) bool
- func LoadConf(key string, obj interface{}) error
- func Start(opts ...Option)
- func Stop()
- type Engine
- type Option
- func WithConfigInterface(c config.ConfigInterface) Option
- func WithConfigProvider(configProvider provides.ConfigProvider) Option
- func WithGracefulWait(t time.Duration) Option
- func WithInjectValues(objects ...*gdi.Object) Option
- func WithInjector(injectType factory.InjectType) Option
- func WithInterruptSignals(signals ...os.Signal) Option
- func WithLogger(opts ...logger.Option) Option
- func WithProviders(provides ...provides.Provider) Option
Constants ¶
This section is empty.
Variables ¶
View Source
var InterruptSignals = []os.Signal{ syscall.SIGINT, syscall.SIGTERM, os.Interrupt, syscall.SIGHUP, syscall.SIGSTOP, syscall.SIGQUIT, }
InterruptSignals interrupt signals.
Functions ¶
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine application engine
type Option ¶
type Option func(e *Engine)
Option engine option
func WithConfigInterface ¶
func WithConfigInterface(c config.ConfigInterface) Option
WithConfigInterface set config read interface
func WithConfigProvider ¶ added in v1.3.0
func WithConfigProvider(configProvider provides.ConfigProvider) Option
WithConfigProvider add config providers
func WithGracefulWait ¶
WithGracefulWait set engine gracefulWait.
func WithInjectValues ¶
WithInjectValues set inject object
func WithInjector ¶
func WithInjector(injectType factory.InjectType) Option
WithInjector set injector inject type as: factory.FbInject or factory.DigInject
func WithInterruptSignals ¶
WithInterruptSignals set engine interruptSignals
func WithProviders ¶
WithProviders add providers
Click to show internal directories.
Click to hide internal directories.