Versions in this module Expand all Collapse all v0 v0.1.0 Nov 7, 2019 Changes in this version + const Prefix + const Version + func NewConfig() (*viper.Viper, error) + func NewLogger(config *viper.Viper) (*logrus.Logger, error) + func NewMetricsInvoke(ms *Multiserver) error + func NewNopLogger() *logrus.Logger + func NewProfilerInvoke(ms *Multiserver) error + func NewSentry(config *viper.Viper) (*raven.Client, error) + type Job struct + Exclusive bool + ExclusiveTimeout time.Duration + Handler func() + Immediately bool + Name string + Period time.Duration + type LogrusSentryHook struct + func NewLogrusSentryHook(client *raven.Client) LogrusSentryHook + func (h LogrusSentryHook) Fire(entry *logrus.Entry) error + func (h LogrusSentryHook) Levels() []logrus.Level + type LogrusSlackHook struct + func NewLogrusSlackHook(config *viper.Viper) LogrusSlackHook + func (h LogrusSlackHook) Fire(entry *logrus.Entry) error + func (h LogrusSlackHook) Levels() []logrus.Level + type Multiserver struct + func NewMultiServers(config *viper.Viper, logger *logrus.Logger, lc fx.Lifecycle) (*Multiserver, error) + func (ms *Multiserver) Add(name string, handler http.Handler) error + type Narada struct + func New(name string, version string, providers ...interface{}) *Narada + func (t *Narada) Start(fn interface{}) + func (t *Narada) Stop() + func (t Narada) HandleError(err error) + 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 SlackMessage struct + Attachments []*SlackAttachment + Channel string + IconEmoji string + IconUrl string + Text string + UnfurlLinks bool + Username string + func (m *SlackMessage) AddAttachment(a *SlackAttachment) + type Workers struct + func NewWorkers(opts WorkersOptions) (*Workers, error) + func (w *Workers) Add(jobs ...Job) + type WorkersOptions struct + Config *viper.Viper + LC fx.Lifecycle + Locker lib.Locker + Logger *logrus.Logger