svcfw

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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) Run

func (f *AppFramework) Run() error

Run start the app

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

func (*AppFramework) Stop

func (f *AppFramework) Stop()

Stop stop the app

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 (*WatchSignalExitSubService) Run

func (*WatchSignalExitSubService) Stop

Source Files

  • framework.go
  • ilog_impl.go
  • sig_quiter.go

Jump to

Keyboard shortcuts

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