Overview of krammar DSL and Code Generator
masterThe krammar directory contains a custom Domain Specific Language (DSL) and code generator used to produce Go structs and encoding/decoding functions for the Kafka wire protocol.
Workflow:
- The generator reads definition files from
definitions/and anenumsfile. - It outputs the generated Go code to
../pkg/kmsg/generated.go.
Definition files are ordered numerically (e.g., 00_produce, 01_fetch). Request and response pairs must be defined together, with the response immediately following its request.