ingest

package
v3.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeSignalFx

type FakeSignalFx struct {
	// contains filtered or unexported fields
}

FakeSignalFx is a mock of the ingest server. Holds all of the received datapoints for later inspection

func NewFakeSignalFx

func NewFakeSignalFx() *FakeSignalFx

NewFakeSignalFx creates a new instance of FakeSignalFx but does not start the server

func (*FakeSignalFx) Close

func (f *FakeSignalFx) Close()

Close stops the mock HTTP server

func (*FakeSignalFx) EnsureNoDatapoints

func (f *FakeSignalFx) EnsureNoDatapoints()

EnsureNoDatapoints asserts that there are no datapoints received for 4 seconds.

func (*FakeSignalFx) PopIngestedDatapoints

func (f *FakeSignalFx) PopIngestedDatapoints() []*sfxproto.DataPoint

PopIngestedDatapoints returns all currently received datapoints and removes them from the server state so that they won't be returned again.

func (*FakeSignalFx) ServeHTTP

func (f *FakeSignalFx) ServeHTTP(rw http.ResponseWriter, r *http.Request)

ServeHTTP handles a single request

func (*FakeSignalFx) Start

func (f *FakeSignalFx) Start()

Start creates and starts the mock HTTP server

func (*FakeSignalFx) URL

func (f *FakeSignalFx) URL() *url.URL

URL is the of the mock server to point your objects under test to

func (*FakeSignalFx) Writer

func (f *FakeSignalFx) Writer() *writer.SignalFxWriter

Writer returns a SignalFxWriter that is configured to use this fake ingest

Jump to

Keyboard shortcuts

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