View Source Twirp.Plug (Twirp Elixir v0.1.1)
Provides a plug that takes service and handler module. If the request is directed at the "twirp" endpoint then the plug will intercept the conn and process it. Otherwise it allows the conn to pass through. This is a deviation from the twirp specification but it allows users to include twirp services into their existing plug stacks.
You can use the plug like so:
plug Twirp.Plug,
service: MyService,
handler: MyHandler,