Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorReporter ¶
type ErrorReporter interface { // Msg sends a message asynchronously Msg(msg string, meta *ErrorMeta) // Error sends an error type asynchronously Error(err error, meta *ErrorMeta) }
ErrorReporter is an interface to the error reporting system Could by Stackdriver, could be Sentry
type MetaErrorReporter ¶
type MetaErrorReporter struct {
// contains filtered or unexported fields
}
MetaErrorReporter is an ErrorReporter that reports to multiple services. Reports to Stackdriver and Sentry
func NewMetaErrorReporter ¶
func NewMetaErrorReporter(config *MetaErrorReporterConfig) (*MetaErrorReporter, error)
NewMetaErrorReporter returns a initialized MetaErrorReporter
func (*MetaErrorReporter) Error ¶
func (m *MetaErrorReporter) Error(err error, meta *ErrorMeta)
Error sends an error type asynchronously
func (*MetaErrorReporter) Msg ¶
func (m *MetaErrorReporter) Msg(msg string, meta *ErrorMeta)
Msg sends a message asynchronously
type MetaErrorReporterConfig ¶
type MetaErrorReporterConfig struct { StackDriverProjectID string StackDriverServiceName string StackDriverServiceVersion string SentryDSN string SentryRelease string SentryLoggerName string SentryDebug bool SentryEnv string SentrySampleRate float32 }
MetaErrorReporterConfig configures the meta error reporting
type NullErrorReporter ¶
type NullErrorReporter struct { }
NullErrorReporter is a reporter that does nothing. Used for testing or if an "empty" reporter that logs to nowhere.
func (*NullErrorReporter) Error ¶
func (n *NullErrorReporter) Error(err error, meta *ErrorMeta)
Error does nothing here
func (*NullErrorReporter) Msg ¶
func (n *NullErrorReporter) Msg(msg string, meta *ErrorMeta)
Msg does nothing here
Click to show internal directories.
Click to hide internal directories.