Annotations

Below is a summary of all the current annotations that mu provides:

Annotation Scope Arguments Description
@service Trait (SerializationType, Compression) Tags the trait as an RPC service in order to derive server and client code (macro expansion). For the SerializationType parameter value, Protobuf and Avro are the current supported serialization methods. For the Compression parameter value, only Gzip is supported.
@message Case Class - Tags the case class as an RPC message.
@option Object (name: String, value: Any) Defines the equivalent headers in .proto files.
@outputPackage Object (value: String) Defines the package declaration in .proto files, and the namespace tag in .avpr files.
@outputName Object (value: String) Defines the protocol tag in .avpr files; if missing, the idlGen tool will use the source file name (without .scala extension) instead.