raven

package
v0.0.0-...-66cff79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDP_TEMPLATE = "%s\n\n%s"
)

Variables

This section is empty.

Functions

func AuthHeader

func AuthHeader(timestamp time.Time, publicKey string) string

Compute the Sentry authentication header

Types

type Client

type Client struct {
	URL       *url.URL
	PublicKey string
	SecretKey string
	Project   string
	Logger    string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(dsn string, logger string) (self *Client, err error)

NewClient creates a new client for a server identified by the given dsn A dsn is a string in the form:

{PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}/{PATH}{PROJECT_ID}

eg:

http://abcd:efgh@sentry.example.com/sentry/project1

func (*Client) CaptureMessage

func (self *Client) CaptureMessage(message string, extra map[string]interface{}) (err error)

CaptureMessage sends a message to the Sentry server.

func (Client) Error

func (client Client) Error(v ...interface{}) error

func (Client) Errorf

func (client Client) Errorf(format string, v ...interface{}) error

func (Client) Errorln

func (client Client) Errorln(v ...interface{}) error

type HttpClient

type HttpClient interface {
	Do(req *http.Request) (resp *http.Response, err error)
}

type HttpSentryTransport

type HttpSentryTransport struct {
	PublicKey string
	URL       *url.URL
	Project   string
	Client    HttpClient
}

func (*HttpSentryTransport) Send

func (self *HttpSentryTransport) Send(packet []byte, timestamp time.Time) (response string, err error)

type SentryTransport

type SentryTransport interface {
	Send(packet []byte, timestamp time.Time) (response string, err error)
}

type UdpSentryTransport

type UdpSentryTransport struct {
	PublicKey string
	URL       *url.URL
	Client    net.Conn
}

func (*UdpSentryTransport) Send

func (self *UdpSentryTransport) Send(packet []byte, timestamp time.Time) (response string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL