Documentation
¶
Overview ¶
Package transport defines the cross-cutting Endpoint + Error abstractions every concrete transport (grpc, rest, amqp, nats, tcp, udp, websocket) implements.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONDecoder ¶ added in v0.4.0
JSONDecoder is a ready-made Decoder for JSON payloads. Mirror of JSONEncoder for the consumer side.
Types ¶
type AnyEndpoint ¶
type Decoder ¶ added in v0.4.0
Decoder is the inverse of Encoder: given a payload (and any broker metadata the transport extracted into ctx) it returns the decoded value or an error.
type Encoder ¶ added in v0.4.0
Encoder turns an application value into the byte payload that goes on the wire. Returns an error if the value cannot be marshalled.
type ErrorHandler ¶
type Handler ¶ added in v0.4.0
Handler is implemented by application code that consumes events. Returning a non-nil error signals the transport to nack / retry the message according to its semantics.
type HandlerFunc ¶ added in v0.4.0
HandlerFunc adapts a plain function to the Handler interface.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package amqp provides a comprehensive RabbitMQ/AMQP consumer and producer framework.
|
Package amqp provides a comprehensive RabbitMQ/AMQP consumer and producer framework. |
|
amqptest
Package amqptest provides mocks and helpers for testing AMQP connections
|
Package amqptest provides mocks and helpers for testing AMQP connections |
|
Package grpc provides a comprehensive gRPC server and client framework.
|
Package grpc provides a comprehensive gRPC server and client framework. |
|
middleware
Package middleware provides common gRPC server middlewares
|
Package middleware provides common gRPC server middlewares |
|
Package nats provides NATS / JetStream consumer + publisher helpers built on the broker-agnostic kit/transport interface.
|
Package nats provides NATS / JetStream consumer + publisher helpers built on the broker-agnostic kit/transport interface. |
|
Package rest provides the kit's HTTP/REST server, client, and route-registration primitives.
|
Package rest provides the kit's HTTP/REST server, client, and route-registration primitives. |
|
Package tcp provides a comprehensive TCP server and client framework.
|
Package tcp provides a comprehensive TCP server and client framework. |
|
Package udp provides a UDP transport implementation with optional reliability.
|
Package udp provides a UDP transport implementation with optional reliability. |
|
Package websocket provides a comprehensive WebSocket client framework.
|
Package websocket provides a comprehensive WebSocket client framework. |