Documentation
¶
Index ¶
- func New(c *Config) (errornotifier.Notifier, io.Closer, error)
- func SetupAirbrakeNotifier(lc *lifecycle.Lifecycle, conf *AirbrakeConfig) (errornotifier.Notifier, error)
- func SetupNotifier(lc *lifecycle.Lifecycle, conf *Config) (errornotifier.Notifier, error)
- type AirbrakeConfig
- type Config
- type Kind
- type LogNotifier
- type Notifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupAirbrakeNotifier ¶
func SetupAirbrakeNotifier(lc *lifecycle.Lifecycle, conf *AirbrakeConfig) (errornotifier.Notifier, error)
func SetupNotifier ¶
Types ¶
type AirbrakeConfig ¶
type Config ¶
type Config struct {
Kind Kind `confx:"kind" validate:"required,oneof=log airbrake" usage:"Error notifier type, can be 'log' or 'airbrake'"`
Airbrake AirbrakeConfig `confx:"airbrake" validate:"skip_nested_unless=Kind airbrake" usage:"Airbrake configuration, required when kind is 'airbrake'"`
}
type LogNotifier ¶
type LogNotifier struct {
// contains filtered or unexported fields
}
func NewLogNotifier ¶
func NewLogNotifier() *LogNotifier
func (*LogNotifier) Close ¶
func (n *LogNotifier) Close() error
func (*LogNotifier) WithLogger ¶
func (n *LogNotifier) WithLogger(logger *slog.Logger) *LogNotifier
type Notifier ¶
type Notifier interface {
errornotifier.Notifier
io.Closer
}
func NewAirbrakeNotifier ¶
func NewAirbrakeNotifier(conf errornotifier.AirbrakeConfig) (Notifier, error)
Click to show internal directories.
Click to hide internal directories.