eventstreamapi

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

View Source
const (
	ChunkSignatureHeader = `:chunk-signature` // chunk signature for message
	DateHeader           = `:date`            // Date header for signature
	ContentTypeHeader    = ":content-type"    // message payload content-type

	// Message header and values
	MessageTypeHeader    = `:message-type` // Identifies type of message.
	EventMessageType     = `event`
	ErrorMessageType     = `error`
	ExceptionMessageType = `exception`

	// Message Events
	EventTypeHeader = `:event-type` // Identifies message event type e.g. "Stats".

	// Message Error
	ErrorCodeHeader    = `:error-code`
	ErrorMessageHeader = `:error-message`

	// Message Exception
	ExceptionTypeHeader = `:exception-type`
)

EventStream headers with specific meaning to async API functionality.

Variables

This section is empty.

Functions

func AddInitializeStreamWriter

func AddInitializeStreamWriter(stack *middleware.Stack) error

AddInitializeStreamWriter adds the InitializeStreamWriter middleware to the provided stack.

func ApplyHTTPTransportFixes

func ApplyHTTPTransportFixes(r *smithyhttp.Request) error

ApplyHTTPTransportFixes applies fixes to the HTTP request for proper event stream functionality.

This operation is a no-op for Go 1.18 and above.

func GetInputStreamWriter

func GetInputStreamWriter(ctx context.Context) io.WriteCloser

GetInputStreamWriter returns EventTypeHeader io.PipeWriter used for the operation's input event stream.

Types

type InitializeStreamWriter

type InitializeStreamWriter struct{}

InitializeStreamWriter is a Finalize middleware initializes an in-memory pipe for sending event stream messages via the HTTP request body.

func (*InitializeStreamWriter) HandleFinalize

HandleFinalize is the middleware implementation.

func (*InitializeStreamWriter) ID

ID returns the identifier for the middleware.

Jump to

Keyboard shortcuts

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