Versions in this module Expand all Collapse all v2 v2.0.0 Jul 30, 2026 Changes in this version + const ErrorKey + func Err(err error) slog.Attr + func Fatal(logger *slog.Logger, msg string, args ...any) + func NewConfig(prefix string) (*viper.Viper, error) + func NewLogger(config *viper.Viper) (*slog.Logger, error) + func NewMetricsInvoke(ms *Multiserver) error + func NewNopLogger() *slog.Logger + func NewProfilerInvoke(ms *Multiserver) error + func NewSentryInvoke(config *viper.Viper, lc fx.Lifecycle) error + func WithHealthcheck(path string) serverOption + type Healthchecker func() error + type Multiserver struct + func NewMultiServers(config *viper.Viper, logger *slog.Logger, lc fx.Lifecycle) (*Multiserver, error) + func (ms *Multiserver) Add(name string, handler http.Handler, opts ...serverOption) error + func (ms *Multiserver) AddHealthcheck(name, path string, check Healthchecker) error + type Narada struct + func New(opts Options, providers ...interface{}) *Narada + func (t *Narada) Invoke(fn interface{}) + func (t *Narada) Start(fn interface{}) + func (t *Narada) Stop() + func (t Narada) HandleError(err error) + type Options struct + EnvPrefix string + Name string + Version string + type SentryHandler struct + func NewSentryHandler(next slog.Handler) *SentryHandler + func (h *SentryHandler) Enabled(ctx context.Context, level slog.Level) bool + func (h *SentryHandler) Handle(ctx context.Context, r slog.Record) error + func (h *SentryHandler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *SentryHandler) WithGroup(name string) slog.Handler + type SlackAttachment struct + Color string + Fallback string + Fields []*SlackField + Pretext string + Text string + Title string + func NewAttachment() *SlackAttachment + func (a *SlackAttachment) AddField(f *SlackField) + type SlackClient struct + Url string + func NewClient(url string) *SlackClient + func (c *SlackClient) SendMessage(msg *SlackMessage) error + type SlackError struct + Body string + Code int + func (e *SlackError) Error() string + type SlackField struct + Short bool + Title string + Value string + func NewField() *SlackField + type SlackHandler struct + func NewSlackHandler(config *viper.Viper, next slog.Handler) *SlackHandler + func (h *SlackHandler) Enabled(ctx context.Context, level slog.Level) bool + func (h *SlackHandler) Handle(ctx context.Context, r slog.Record) error + func (h *SlackHandler) WithAttrs(attrs []slog.Attr) slog.Handler + func (h *SlackHandler) WithGroup(name string) slog.Handler + type SlackMessage struct + Attachments []*SlackAttachment + Channel string + IconEmoji string + IconUrl string + Text string + UnfurlLinks bool + Username string + func (m *SlackMessage) AddAttachment(a *SlackAttachment) Other modules containing this package github.com/cryptopay-dev/narada