transport

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffered

type Buffered struct {
	rollbar.Transport
	// contains filtered or unexported fields
}

Buffered is an alternative to rollbar's AsyncTransport, providing threadsafe and predictable message delivery built on top of the SyncTransport.

func NewBuffered

func NewBuffered(inner rollbar.Transport, bufSize int) *Buffered

NewBuffered wraps the provided transport for async delivery.

func (*Buffered) Close

func (t *Buffered) Close() error

Close shuts down the transport and waits for queued messages to be delivered.

func (*Buffered) Send

func (t *Buffered) Send(body map[string]interface{}) error

Send enqueues delivery of the message body to Rollbar without waiting for the result. If the buffer is full, it will immediately return an error.

func (*Buffered) Wait

func (t *Buffered) Wait()

Wait blocks until all messages buffered before calling Wait are delivered.

Jump to

Keyboard shortcuts

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