eventstream

package
v1.27.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
	Serializer   func() smithy.ShapeSerializer
	Deserializer func([]byte) smithy.ShapeDeserializer
	ContentType  string
	// contains filtered or unexported fields
}

Codec orchestrates event stream message serde for protocols that use the standard event stream binary framing.

func (*Codec) DeserializeEventMessage

func (c *Codec) DeserializeEventMessage(schema *smithy.Schema, types *smithy.TypeRegistry, r io.Reader) (smithy.Deserializable, error)

DeserializeEventMessage reads an event from the output stream.

func (*Codec) DeserializeInitialResponse

func (c *Codec) DeserializeInitialResponse(schema *smithy.Schema, r io.Reader, out smithy.Deserializable) error

DeserializeInitialResponse reads the first event stream message and deserializes it as the operation output.

func (*Codec) RequireBidiHTTP2

func (c *Codec) RequireBidiHTTP2(proto string, protoMajor int) error

RequireBidiHTTP2 returns an error if the response protocol is not at least HTTP/2, which is required for bidirectional event streams.

func (*Codec) SerializeEventMessage

func (c *Codec) SerializeEventMessage(schema, variant *smithy.Schema, v smithy.Serializable, w io.Writer) error

SerializeEventMessage serializes an event to the input stream.

func (*Codec) SerializeInitialRequest

func (c *Codec) SerializeInitialRequest(schema *smithy.Schema, v smithy.Serializable, w io.Writer) error

SerializeInitialRequest serializes the operation input as the first event stream message with :event-type "initial-request".

type NoEventStream

type NoEventStream struct{}

NoEventStream implements the event stream methods of github.com/aws/smithy-go/transport/http.ClientProtocol for protocols that do not support event streams.

func (NoEventStream) DeserializeEventMessage

func (NoEventStream) DeserializeEventMessage(_ *smithy.Schema, _ *smithy.TypeRegistry, _ io.Reader) (smithy.Deserializable, error)

DeserializeEventMessage returns an error.

func (NoEventStream) DeserializeInitialResponse

func (NoEventStream) DeserializeInitialResponse(_ *smithy.Schema, _ io.Reader, _ smithy.Deserializable) error

DeserializeInitialResponse returns an error.

func (NoEventStream) HasInitialEventMessage

func (NoEventStream) HasInitialEventMessage() bool

HasInitialEventMessage returns false.

func (NoEventStream) SerializeEventMessage

func (NoEventStream) SerializeEventMessage(_, _ *smithy.Schema, _ smithy.Serializable, _ io.Writer) error

SerializeEventMessage returns an error.

func (NoEventStream) SerializeInitialRequest

func (NoEventStream) SerializeInitialRequest(_ *smithy.Schema, _ smithy.Serializable, _ io.Writer) error

SerializeInitialRequest returns an error.

Jump to

Keyboard shortcuts

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