Documentation
¶
Index ¶
- Variables
- func LogLevel() zapcore.Level
- func LogLevelHttpHandler() http.Handler
- func Run(appCallback func(appCtx context.Context, logger *zap.SugaredLogger))
- func SetLogLevel(level zapcore.Level)
- func Start(appCallback func(appCtx Context, logger *zap.SugaredLogger))
- type Application
- func WithConfig(config interface{}) *Application
- func WithExtensions(extensions ...Extension) *Application
- func WithPanicwatchConfig(panicwatchConfig func(*panicwatch.Config, *zap.SugaredLogger)) *Application
- func WithSentryConfig(sentryConfig func(*sentry.ClientOptions)) *Application
- func WithTerminationSignals(signals ...os.Signal) *Application
- func WithZapConfig(zapConfig func(*zap.Config)) *Application
- func (app *Application) Run(appCallback func(appCtx context.Context, logger *zap.SugaredLogger))
- func (app *Application) Start(appCallback func(appCtx Context, logger *zap.SugaredLogger))
- func (app *Application) WithConfig(config interface{}) *Application
- func (app *Application) WithExtensions(extensions ...Extension) *Application
- func (app *Application) WithPanicwatchConfig(panicwatchConfig func(*panicwatch.Config, *zap.SugaredLogger)) *Application
- func (app *Application) WithSentryConfig(sentryConfig func(*sentry.ClientOptions)) *Application
- func (app *Application) WithTerminationSignals(signals ...os.Signal) *Application
- func (app *Application) WithZapConfig(zapConfig func(*zap.Config)) *Application
- type CliContext
- func (c *CliContext) Deadline() (deadline time.Time, ok bool)
- func (c *CliContext) Done() <-chan struct{}
- func (c *CliContext) Err() error
- func (c *CliContext) IsShuttingDown() bool
- func (c *CliContext) Shutdown()
- func (c *CliContext) StartWorker(worker func())
- func (c *CliContext) Value(key interface{}) interface{}
- func (c *CliContext) WaitForWorkers()
- type ConfigValidator
- type Context
- type Extension
- type PanicwatchSentryIntegration
- type TrimPathSentryIntegration
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Release string
)
Functions ¶
func LogLevelHttpHandler ¶
func SetLogLevel ¶
func Start ¶
func Start(appCallback func(appCtx Context, logger *zap.SugaredLogger))
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func WithConfig ¶
func WithConfig(config interface{}) *Application
func WithExtensions ¶
func WithExtensions(extensions ...Extension) *Application
func WithPanicwatchConfig ¶
func WithPanicwatchConfig(panicwatchConfig func(*panicwatch.Config, *zap.SugaredLogger)) *Application
func WithSentryConfig ¶
func WithSentryConfig(sentryConfig func(*sentry.ClientOptions)) *Application
func WithTerminationSignals ¶
func WithTerminationSignals(signals ...os.Signal) *Application
func WithZapConfig ¶
func WithZapConfig(zapConfig func(*zap.Config)) *Application
func (*Application) Run ¶
func (app *Application) Run(appCallback func(appCtx context.Context, logger *zap.SugaredLogger))
func (*Application) Start ¶
func (app *Application) Start(appCallback func(appCtx Context, logger *zap.SugaredLogger))
func (*Application) WithConfig ¶
func (app *Application) WithConfig(config interface{}) *Application
func (*Application) WithExtensions ¶
func (app *Application) WithExtensions(extensions ...Extension) *Application
func (*Application) WithPanicwatchConfig ¶
func (app *Application) WithPanicwatchConfig( panicwatchConfig func(*panicwatch.Config, *zap.SugaredLogger), ) *Application
func (*Application) WithSentryConfig ¶
func (app *Application) WithSentryConfig(sentryConfig func(*sentry.ClientOptions)) *Application
func (*Application) WithTerminationSignals ¶
func (app *Application) WithTerminationSignals(signals ...os.Signal) *Application
func (*Application) WithZapConfig ¶
func (app *Application) WithZapConfig(zapConfig func(*zap.Config)) *Application
type CliContext ¶
type CliContext struct {
// contains filtered or unexported fields
}
func NewCliContext ¶
func NewCliContext(signals ...os.Signal) *CliContext
func (*CliContext) Done ¶
func (c *CliContext) Done() <-chan struct{}
func (*CliContext) Err ¶
func (c *CliContext) Err() error
func (*CliContext) IsShuttingDown ¶
func (c *CliContext) IsShuttingDown() bool
func (*CliContext) Shutdown ¶
func (c *CliContext) Shutdown()
func (*CliContext) StartWorker ¶
func (c *CliContext) StartWorker(worker func())
func (*CliContext) Value ¶
func (c *CliContext) Value(key interface{}) interface{}
func (*CliContext) WaitForWorkers ¶
func (c *CliContext) WaitForWorkers()
type ConfigValidator ¶
type ConfigValidator interface {
Validate() error
}
type Extension ¶
type Extension interface { Initialize(configLoader func(config interface{}), logger *zap.SugaredLogger) error Start(appCtx Context, logger *zap.SugaredLogger) }
type PanicwatchSentryIntegration ¶
type PanicwatchSentryIntegration struct { }
func (*PanicwatchSentryIntegration) Name ¶
func (p *PanicwatchSentryIntegration) Name() string
func (*PanicwatchSentryIntegration) SetupOnce ¶
func (p *PanicwatchSentryIntegration) SetupOnce(client *sentry.Client)
type TrimPathSentryIntegration ¶
type TrimPathSentryIntegration struct { // AppModule is optional (for cases where auto-detection doesn't work) and is used when building with -trimpath. // Full module name is expected (optionally ending with slash), eg: github.com/grongor/panicwatch AppModule string // AppPath is optional (for cases where auto-detection doesn't work) and is used when building without -trimpath. // Absolute path to the root module is expected (optionally ending with slash), eg: /myprojects/panicwatch/ AppPath string }
func (*TrimPathSentryIntegration) Name ¶
func (t *TrimPathSentryIntegration) Name() string
func (*TrimPathSentryIntegration) SetupOnce ¶
func (t *TrimPathSentryIntegration) SetupOnce(client *sentry.Client)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.