testhelpers

package
v0.0.0-...-b5b3775 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestLoggerSink = new(TestStenoSink)

Functions

func Logger

func Logger() *gosteno.Logger

func StdOutLogger

func StdOutLogger() *gosteno.Logger

Types

type FakeBufferSink

type FakeBufferSink struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewFakeBufferSink

func NewFakeBufferSink(buffer *bytes.Buffer) *FakeBufferSink

func (*FakeBufferSink) AddRecord

func (x *FakeBufferSink) AddRecord(record *gosteno.Record)

func (*FakeBufferSink) Flush

func (x *FakeBufferSink) Flush()

func (*FakeBufferSink) GetCodec

func (x *FakeBufferSink) GetCodec() gosteno.Codec

func (*FakeBufferSink) GetContent

func (x *FakeBufferSink) GetContent() string

func (*FakeBufferSink) SetCodec

func (x *FakeBufferSink) SetCodec(codec gosteno.Codec)

type FakeDatadogAPI

type FakeDatadogAPI struct {
	ReceivedContents chan []byte
	// contains filtered or unexported fields
}

func NewFakeDatadogAPI

func NewFakeDatadogAPI() *FakeDatadogAPI

func (*FakeDatadogAPI) Close

func (f *FakeDatadogAPI) Close()

func (*FakeDatadogAPI) ServeHTTP

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

func (*FakeDatadogAPI) Start

func (f *FakeDatadogAPI) Start()

func (*FakeDatadogAPI) URL

func (f *FakeDatadogAPI) URL() string

type FakeFirehose

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

func NewFakeFirehose

func NewFakeFirehose(validToken string) *FakeFirehose

func (*FakeFirehose) AddEvent

func (f *FakeFirehose) AddEvent(event events.Envelope)

func (*FakeFirehose) Close

func (f *FakeFirehose) Close()

func (*FakeFirehose) LastAuthorization

func (f *FakeFirehose) LastAuthorization() string

func (*FakeFirehose) Requested

func (f *FakeFirehose) Requested() bool

func (*FakeFirehose) ServeHTTP

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

func (*FakeFirehose) SetCloseMessage

func (f *FakeFirehose) SetCloseMessage(message []byte)

func (*FakeFirehose) Start

func (f *FakeFirehose) Start()

func (*FakeFirehose) URL

func (f *FakeFirehose) URL() string

type FakeIdleFirehose

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

func NewFakeIdleFirehose

func NewFakeIdleFirehose(timeout time.Duration) *FakeIdleFirehose

func (*FakeIdleFirehose) Close

func (f *FakeIdleFirehose) Close()

func (*FakeIdleFirehose) ServeHTTP

func (f *FakeIdleFirehose) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*FakeIdleFirehose) Start

func (f *FakeIdleFirehose) Start()

func (*FakeIdleFirehose) URL

func (f *FakeIdleFirehose) URL() string

type FakeTokenFetcher

type FakeTokenFetcher struct {
	NumCalls int
}

func (*FakeTokenFetcher) FetchAuthToken

func (tokenFetcher *FakeTokenFetcher) FetchAuthToken() string

type FakeUAA

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

func NewFakeUAA

func NewFakeUAA(tokenType string, accessToken string) *FakeUAA

func (*FakeUAA) AuthToken

func (f *FakeUAA) AuthToken() string

func (*FakeUAA) Close

func (f *FakeUAA) Close()

func (*FakeUAA) Requested

func (f *FakeUAA) Requested() bool

func (*FakeUAA) ServeHTTP

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

func (*FakeUAA) Start

func (f *FakeUAA) Start()

func (*FakeUAA) URL

func (f *FakeUAA) URL() string

type TestStenoSink

type TestStenoSink struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*TestStenoSink) AddRecord

func (t *TestStenoSink) AddRecord(record *gosteno.Record)

func (*TestStenoSink) Clear

func (t *TestStenoSink) Clear()

func (*TestStenoSink) Flush

func (t *TestStenoSink) Flush()

func (*TestStenoSink) GetCodec

func (t *TestStenoSink) GetCodec() gosteno.Codec

func (*TestStenoSink) LogContents

func (t *TestStenoSink) LogContents() string

func (*TestStenoSink) SetCodec

func (t *TestStenoSink) SetCodec(codec gosteno.Codec)

Jump to

Keyboard shortcuts

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