Documentation ¶
Index ¶
- type BaseApp
- func (b *BaseApp) GetConfig() ServerConfig
- func (b *BaseApp) GetContextWithCorrelation(ctx context.Context, c *log.CorrelationParam) context.Context
- func (b *BaseApp) GetContextWithCustomerId(ctx context.Context, c *log.CustomerIdentifier) context.Context
- func (b *BaseApp) GetLogger() log.Log
- func (b *BaseApp) GetNotifier() errors.ErrorNotifier
- func (b *BaseApp) PanicRecovery(ctx context.Context, rec any) (string, error)
- func (b *BaseApp) ProcessError(ctx context.Context, stackTrace string, err error) (int, []byte)
- func (b *BaseApp) RegisterHealthCheckHook(handler HealthCheckHook)
- func (b *BaseApp) RegisterHooks(hook any)
- func (b *BaseApp) RegisterOnShutdownHook(handler ShutdownHook)
- func (b *BaseApp) RegisterStatusCheckHook(handler StatusCheckHook)
- func (b *BaseApp) RunHealthCheck(ctx context.Context) error
- func (b *BaseApp) RunStatusCheck(ctx context.Context) map[string]any
- func (b *BaseApp) SetErrorNotifier(errorNotifier errors.ErrorNotifier)
- func (b *BaseApp) Shutdown(ctx context.Context)
- func (b *BaseApp) StartSignalMonitor(ctx context.Context) error
- func (b *BaseApp) WaitForCompleteShutDown()
- type HealthCheckHook
- type ServerConfig
- type ShutdownHook
- type StatusCheckHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseApp ¶
type BaseApp struct {
// contains filtered or unexported fields
}
func New ¶
func New(appConfig ServerConfig, logger log.Log, notifier errors.ErrorNotifier) *BaseApp
func (*BaseApp) GetConfig ¶
func (b *BaseApp) GetConfig() ServerConfig
func (*BaseApp) GetContextWithCorrelation ¶
func (*BaseApp) GetContextWithCustomerId ¶
func (*BaseApp) GetNotifier ¶
func (b *BaseApp) GetNotifier() errors.ErrorNotifier
func (*BaseApp) PanicRecovery ¶
func (*BaseApp) ProcessError ¶
func (*BaseApp) RegisterHealthCheckHook ¶
func (b *BaseApp) RegisterHealthCheckHook(handler HealthCheckHook)
func (*BaseApp) RegisterHooks ¶
func (*BaseApp) RegisterOnShutdownHook ¶
func (b *BaseApp) RegisterOnShutdownHook(handler ShutdownHook)
func (*BaseApp) RegisterStatusCheckHook ¶
func (b *BaseApp) RegisterStatusCheckHook(handler StatusCheckHook)
func (*BaseApp) RunStatusCheck ¶
func (*BaseApp) SetErrorNotifier ¶
func (b *BaseApp) SetErrorNotifier(errorNotifier errors.ErrorNotifier)
func (*BaseApp) StartSignalMonitor ¶
func (*BaseApp) WaitForCompleteShutDown ¶
func (b *BaseApp) WaitForCompleteShutDown()
type HealthCheckHook ¶
type ServerConfig ¶
type ServerConfig struct {
ServiceName string
}
type ShutdownHook ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.