eventstreamtest

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

EventMessageTypeHeader is a event message type header for marking an message as being the event type.

Functions

func MarshalEventPayload

func MarshalEventPayload(
	payloadMarshaler protocol.PayloadMarshaler,
	v interface{},
) []byte

MarshalEventPayload marshals a SDK API shape into its associated wire protocol payload.

func SetupEventStreamSession

func SetupEventStreamSession(
	t *testing.T, handler http.Handler, h2 bool,
) (sess *session.Session, cleanupFn func(), err error)

SetupEventStreamSession creates a HTTP server SDK session for communicating with that server to be used for EventStream APIs. If HTTP/2 is enabled the server/client will only attempt to use HTTP/2.

Types

type ServeEventStream

type ServeEventStream struct {
	T      *testing.T
	Events []eventstream.Message
}

ServeEventStream provides serving EventStream messages from a HTTP server to the client. The events are sent sequentially to the client without delay.

func (ServeEventStream) ServeHTTP

func (s ServeEventStream) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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