Documentation
¶
Index ¶
- type AppFramework
- func (f *AppFramework) AddSubSvc(name string, svc core.ISubService)
- func (f *AppFramework) BLDebug(module string, d ...interface{})
- func (f *AppFramework) BLDebugC(module string, data map[string]string)
- func (f *AppFramework) BLDebugF(module string, format string, d ...interface{})
- func (f *AppFramework) BLError(module string, d ...interface{})
- func (f *AppFramework) BLErrorC(module string, data map[string]string)
- func (f *AppFramework) BLErrorF(module string, format string, d ...interface{})
- func (f *AppFramework) BLFatal(module string, d ...interface{})
- func (f *AppFramework) BLFatalC(module string, data map[string]string)
- func (f *AppFramework) BLFatalF(module string, format string, d ...interface{})
- func (f *AppFramework) BLInfo(module string, d ...interface{})
- func (f *AppFramework) BLInfoC(module string, data map[string]string)
- func (f *AppFramework) BLInfoF(module string, format string, d ...interface{})
- func (f *AppFramework) BLPanic(module string, d ...interface{})
- func (f *AppFramework) BLPanicC(module string, data map[string]string)
- func (f *AppFramework) BLPanicF(module string, format string, d ...interface{})
- func (f *AppFramework) BLVerbose(module string, d ...interface{})
- func (f *AppFramework) BLVerboseC(module string, data map[string]string)
- func (f *AppFramework) BLVerboseF(module string, format string, d ...interface{})
- func (f *AppFramework) BLWarn(module string, d ...interface{})
- func (f *AppFramework) BLWarnC(module string, data map[string]string)
- func (f *AppFramework) BLWarnF(module string, format string, d ...interface{})
- func (f *AppFramework) DiscardSubLoggerByPrefix(prefix string)
- func (f *AppFramework) GetContext() context.Context
- func (f *AppFramework) GetModuleLogger(module string) core.IModuleLogger
- func (f *AppFramework) GetRawLogger() *hiedalog.HiedaLogger
- func (f *AppFramework) InitConsoleLogBackend(writer io.Writer, lv string)
- func (f *AppFramework) IsGlobalDebugMode() bool
- func (f *AppFramework) MustPrepare(processName string, fn func() error)
- func (f *AppFramework) Prepare() error
- func (f *AppFramework) Run() error
- func (f *AppFramework) RunWithContext(ctx context.Context) error
- func (f *AppFramework) SetGlobalDebugMode(en bool)
- func (f *AppFramework) ShutdownConsoleLogBackend()
- func (f *AppFramework) Stop()
- type WatchSignalExitSubService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppFramework ¶
type AppFramework struct { core.IModuleLogger core.IModuleLogLevelLimiter // contains filtered or unexported fields }
func NewAppFramework ¶
func NewAppFramework(globalDebugMode bool, appLogModuleName string) *AppFramework
func (*AppFramework) AddSubSvc ¶
func (f *AppFramework) AddSubSvc(name string, svc core.ISubService)
AddSubSvc add a sub service
func (*AppFramework) BLDebug ¶
func (f *AppFramework) BLDebug(module string, d ...interface{})
func (*AppFramework) BLDebugC ¶
func (f *AppFramework) BLDebugC(module string, data map[string]string)
func (*AppFramework) BLDebugF ¶
func (f *AppFramework) BLDebugF(module string, format string, d ...interface{})
func (*AppFramework) BLError ¶
func (f *AppFramework) BLError(module string, d ...interface{})
func (*AppFramework) BLErrorC ¶
func (f *AppFramework) BLErrorC(module string, data map[string]string)
func (*AppFramework) BLErrorF ¶
func (f *AppFramework) BLErrorF(module string, format string, d ...interface{})
func (*AppFramework) BLFatal ¶
func (f *AppFramework) BLFatal(module string, d ...interface{})
func (*AppFramework) BLFatalC ¶
func (f *AppFramework) BLFatalC(module string, data map[string]string)
func (*AppFramework) BLFatalF ¶
func (f *AppFramework) BLFatalF(module string, format string, d ...interface{})
func (*AppFramework) BLInfo ¶
func (f *AppFramework) BLInfo(module string, d ...interface{})
func (*AppFramework) BLInfoC ¶
func (f *AppFramework) BLInfoC(module string, data map[string]string)
func (*AppFramework) BLInfoF ¶
func (f *AppFramework) BLInfoF(module string, format string, d ...interface{})
func (*AppFramework) BLPanic ¶
func (f *AppFramework) BLPanic(module string, d ...interface{})
func (*AppFramework) BLPanicC ¶
func (f *AppFramework) BLPanicC(module string, data map[string]string)
func (*AppFramework) BLPanicF ¶
func (f *AppFramework) BLPanicF(module string, format string, d ...interface{})
func (*AppFramework) BLVerbose ¶
func (f *AppFramework) BLVerbose(module string, d ...interface{})
func (*AppFramework) BLVerboseC ¶
func (f *AppFramework) BLVerboseC(module string, data map[string]string)
func (*AppFramework) BLVerboseF ¶
func (f *AppFramework) BLVerboseF(module string, format string, d ...interface{})
func (*AppFramework) BLWarn ¶
func (f *AppFramework) BLWarn(module string, d ...interface{})
func (*AppFramework) BLWarnC ¶
func (f *AppFramework) BLWarnC(module string, data map[string]string)
func (*AppFramework) BLWarnF ¶
func (f *AppFramework) BLWarnF(module string, format string, d ...interface{})
func (*AppFramework) DiscardSubLoggerByPrefix ¶
func (f *AppFramework) DiscardSubLoggerByPrefix(prefix string)
func (*AppFramework) GetContext ¶
func (f *AppFramework) GetContext() context.Context
func (*AppFramework) GetModuleLogger ¶
func (f *AppFramework) GetModuleLogger(module string) core.IModuleLogger
func (*AppFramework) GetRawLogger ¶
func (f *AppFramework) GetRawLogger() *hiedalog.HiedaLogger
GetRawLogger get the HiedaLogger inside this
func (*AppFramework) InitConsoleLogBackend ¶
func (f *AppFramework) InitConsoleLogBackend(writer io.Writer, lv string)
InitConsoleLogBackend add a hiedalog console backend to logger system if lv == "", for globalDebugMode is on, will use hiedalog.DLN_DEBUG; for globalDebugMode is off, will use hiedalog.DLN_INFO.
func (*AppFramework) IsGlobalDebugMode ¶
func (f *AppFramework) IsGlobalDebugMode() bool
func (*AppFramework) MustPrepare ¶
func (f *AppFramework) MustPrepare(processName string, fn func() error)
func (*AppFramework) Prepare ¶
func (f *AppFramework) Prepare() error
Prepare call the `Prepare()` of each SubService by order of addition
func (*AppFramework) RunWithContext ¶
func (f *AppFramework) RunWithContext(ctx context.Context) error
RunWithContext start the app with custom context
func (*AppFramework) SetGlobalDebugMode ¶
func (f *AppFramework) SetGlobalDebugMode(en bool)
func (*AppFramework) ShutdownConsoleLogBackend ¶
func (f *AppFramework) ShutdownConsoleLogBackend()
ShutdownConsoleLogBackend shutdown the console backend which created by InitConsoleLogBackend
type WatchSignalExitSubService ¶
type WatchSignalExitSubService struct { SignalNotifyFunc func(sig os.Signal) // contains filtered or unexported fields }
func NewWatchSignalExitSubService ¶
func NewWatchSignalExitSubService(sig ...os.Signal) *WatchSignalExitSubService
func NewWatchSignalExitSubServiceWithDefault ¶
func NewWatchSignalExitSubServiceWithDefault() *WatchSignalExitSubService
func (*WatchSignalExitSubService) Prepare ¶
func (q *WatchSignalExitSubService) Prepare(ctx *core.SubServiceContext) error
func (*WatchSignalExitSubService) Run ¶
func (q *WatchSignalExitSubService) Run(ctx *core.SubServiceContext) error
func (*WatchSignalExitSubService) Stop ¶
func (q *WatchSignalExitSubService) Stop(ctx *core.SubServiceContext)
Source Files
¶
- framework.go
- ilog_impl.go
- sig_quiter.go
Click to show internal directories.
Click to hide internal directories.