Documentation ¶
Index ¶
- type FakeSignalFx
- func (f *FakeSignalFx) Close()
- func (f *FakeSignalFx) EnsureNoDatapoints()
- func (f *FakeSignalFx) PopIngestedDatapoints() []*sfxproto.DataPoint
- func (f *FakeSignalFx) ServeHTTP(rw http.ResponseWriter, r *http.Request)
- func (f *FakeSignalFx) Start()
- func (f *FakeSignalFx) URL() *url.URL
- func (f *FakeSignalFx) Writer() *writer.SignalFxWriter
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) 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