Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientOptions ¶
ClientOptions provides the options to configure the behavior of the client
type ErrorEntry ¶
type ErrorEntry struct { Error error Request *httpdata.HTTPRequest CustomData interface{} User string Tags []string }
ErrorEntry holds the information about the error and meta data needed to be recorded in raygun
func NewErrorEntry ¶
func NewErrorEntry(err error) *ErrorEntry
NewErrorEntry creates a new error entry
func (*ErrorEntry) SetCustomData ¶
func (e *ErrorEntry) SetCustomData(data interface{}) *ErrorEntry
SetCustomData is a chainable option-setting method to add arbitrary custom data to the entry. Note that the given type (or at least parts of it) must implement the Marshaler-interface for this to work.
func (*ErrorEntry) SetRequest ¶
func (e *ErrorEntry) SetRequest(r *http.Request) *ErrorEntry
SetRequest is a chainable option-setting method to add a request to this entry.
func (*ErrorEntry) SetTags ¶
func (e *ErrorEntry) SetTags(tags []string) *ErrorEntry
SetTags is a chainable option-setting method to add tags to this entry.
func (*ErrorEntry) SetUser ¶
func (e *ErrorEntry) SetUser(u string) *ErrorEntry
SetUser is a chainable option-setting method to add an affected Username to this entry.
type Notifier ¶
type Notifier interface { Notify(entry *ErrorEntry) error NotifyWithStackTrace(entry *ErrorEntry, t stack.Trace) error }
Notifier notifies raygun about the error
func NewClient ¶
func NewClient(apiKey, version string, opts *ClientOptions) Notifier
NewClient creates a new client to send errors to raygun