nrmock

package
v0.0.0-...-1903895 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 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 DatastoreSegment

type DatastoreSegment struct {
	newrelic.DatastoreSegment
	Txn       newrelic.Transaction
	StartTime newrelic.SegmentStartTime
	Finished  bool
}

func (*DatastoreSegment) End

func (m *DatastoreSegment) End() error

type NewrelicApp

type NewrelicApp struct {
	Tnx *Transaction
}

func (*NewrelicApp) RecordCustomEvent

func (a *NewrelicApp) RecordCustomEvent(eventType string, params map[string]interface{}) error

func (*NewrelicApp) RecordCustomMetric

func (a *NewrelicApp) RecordCustomMetric(name string, value float64) error

func (*NewrelicApp) Shutdown

func (a *NewrelicApp) Shutdown(timeout time.Duration)

func (*NewrelicApp) StartTransaction

func (a *NewrelicApp) StartTransaction(name string, w http.ResponseWriter, r *http.Request) newrelic.Transaction

func (*NewrelicApp) WaitForConnection

func (a *NewrelicApp) WaitForConnection(timeout time.Duration) error

type Transaction

type Transaction struct {
	http.ResponseWriter

	WasEnded bool
	// contains filtered or unexported fields
}

func NewTransaction

func NewTransaction(name string) *Transaction

func (*Transaction) AcceptDistributedTracePayload

func (t *Transaction) AcceptDistributedTracePayload(tp newrelic.TransportType, payload interface{}) error

func (*Transaction) AddAttribute

func (t *Transaction) AddAttribute(key string, val interface{}) error

func (*Transaction) CreateDistributedTracePayload

func (t *Transaction) CreateDistributedTracePayload() newrelic.DistributedTracePayload

func (*Transaction) End

func (t *Transaction) End() error

interface

func (*Transaction) GetAttribute

func (t *Transaction) GetAttribute(key string) (interface{}, bool)

func (*Transaction) GetName

func (t *Transaction) GetName() string

func (*Transaction) Header

func (t *Transaction) Header() http.Header

func (*Transaction) Ignore

func (t *Transaction) Ignore() error

func (*Transaction) NoticeError

func (t *Transaction) NoticeError(err error) error

func (*Transaction) SetName

func (t *Transaction) SetName(name string) error

func (*Transaction) StartSegmentNow

func (t *Transaction) StartSegmentNow() newrelic.SegmentStartTime

func (*Transaction) Write

func (t *Transaction) Write(body []byte) (int, error)

func (*Transaction) WriteHeader

func (t *Transaction) WriteHeader(code int)

Jump to

Keyboard shortcuts

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