Documentation ¶
Overview ¶
Package errcoll contains implementations of error collectors, most notably Sentry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorFlushCollector ¶
type ErrorFlushCollector interface { Interface // Flush waits until the underlying transport sends any buffered events to // the sentry server, blocking for at most the predefined timeout. Flush() }
ErrorFlushCollector collects information about errors, possibly sending them to a remote location. The collected errors should be flushed with the Flush.
type Interface ¶
Interface is the interface for error collectors that process information about errors, possibly sending them to a remote location.
type SentryErrorCollector ¶
type SentryErrorCollector struct {
// contains filtered or unexported fields
}
SentryErrorCollector is an Interface implementation that sends errors to a Sentry-like HTTP API.
func NewSentryErrorCollector ¶
func NewSentryErrorCollector(cli *sentry.Client) (c *SentryErrorCollector)
NewSentryErrorCollector returns a new SentryErrorCollector. cli must be non-nil.
func (*SentryErrorCollector) Collect ¶
func (c *SentryErrorCollector) Collect(ctx context.Context, err error)
Collect implements the Interface interface for *SentryErrorCollector.
func (*SentryErrorCollector) Flush ¶
func (c *SentryErrorCollector) Flush()
Flush implements the ErrorFlushCollector interface for *SentryErrorCollector.
type SentryReportableError ¶
SentryReportableError is the interface for errors and wrapper that can tell whether they should be reported or not.
type WriterErrorCollector ¶
type WriterErrorCollector struct {
// contains filtered or unexported fields
}
WriterErrorCollector is an Interface implementation that writes errors to an io.Writer.
func NewWriterErrorCollector ¶
func NewWriterErrorCollector(w io.Writer) (c *WriterErrorCollector)
NewWriterErrorCollector returns a new properly initialized *WriterErrorCollector.