Expand description
Built-in protocol implementations and registry for switchback attachments.
Transport semantics are orthogonal to contract family.
Parsers attach ProtocolAttachment
envelopes on contract and entity nodes; this crate provides HttpProtocol,
GrpcProtocol, and ProtocolRegistry to encode and decode built-in payload
schemas.
§Entity attachment matrix
| IR node | http payload arm | grpc payload arm |
|---|---|---|
| Contract | HttpContractMeta | GrpcContractMeta |
| Operation | HttpOperationMeta | GrpcOperationMeta |
| Response ref/body | HttpResponseMeta / HttpErrorMeta | GrpcStatusMeta / GrpcErrorMeta |
| Parameter ref/body | HttpParameterMeta | GrpcMetadataMeta |
Decode: read protocol_id, deserialize payload as HttpPayload or
GrpcPayload, inspect the oneof kind. See
ADR 0011
and ADR 0012.
Structs§
- Amqp
Protocol - Built-in AMQP protocol (
"amqp"). - Grpc
Protocol - Built-in gRPC protocol (
"grpc"). - Http
Protocol - Built-in HTTP protocol (
"http"). - Kafka
Protocol - Built-in Kafka protocol (
"kafka"). - Mqtt
Protocol - Built-in MQTT protocol (
"mqtt"). - Protocol
Registry - Registry of built-in protocol decoders.
Enums§
- Amqp
Payload Kind - Decoded AMQP payload oneof arm.
- Decoded
Attachment - Result of decoding a
ProtocolAttachment. - Grpc
Payload Kind - Decoded gRPC payload oneof arm.
- Http
Payload Kind - Decoded HTTP payload oneof arm.
- Kafka
Payload Kind - Decoded Kafka payload oneof arm.
- Mqtt
Payload Kind - Decoded MQTT payload oneof arm.
Traits§
- Error
Protocol - Error / fault documentation aspects.
- Field
Carrier Protocol - Named fields carried outside the message body.
- Operation
Protocol - Operation documentation aspects.
- Protocol
- Stable protocol slug plus metadata.
- Protocol
Wire - Encode/decode the typed payload inside
ProtocolAttachment. - Response
Protocol - Response outcome mapping.
Functions§
- grpc_
status_ name_ severity - Classify a gRPC status name (
OK,INVALID_ARGUMENT, …). - grpc_
status_ severity - Classify a gRPC status code (numeric
google.rpc.Code). - http_
status_ code_ severity - Classify a numeric HTTP status code.
- http_
status_ severity - Classify an OpenAPI / HTTP status key (
200,4XX,default, …).