Creating Custom Protocol Plugins
Most applications need only the built-in Health Check and Reflection modules. A custom protocol is an extension point for infrastructure RPCs or plain HTTP endpoints that do not belong in a business service.
Keep registration repeatable
Do not put observable side effects in register(). Create a fresh protocol instance for each server, and add it before startup or the first in-process client materializes routes. If initial materialization fails, setup can run again on the next attempt.
Go deeper
- Implement a protocol, an HTTP handler or a metrics endpoint.
- Use the built-in reflection protocol.
- Use the built-in health protocol.
Find a section from the full guide
The detailed material is preserved on a separate page. Earlier section links still work here.