Azure / buffalo-azure

A gobuffalo plugin for working with Azure.
https://gobuffalo.io/en/docs/plugins
MIT License
29 stars 8 forks source link

Write Generic Handler Dispatcher #1

Closed marstr closed 6 years ago

marstr commented 6 years ago

My strategy is to register a single HTTP handler that accommodates all Event Types that are supported by the endpoint. It will be the job of that HTTP handler func to dispatch to methods that its aware of that can process various types. That will be a central piece of code that we generate with each project.

I imagine this to be very much like the code found in the root of https://github.com/spf13/cobra projects. There is a central entry point, which all dispatch candidates register themselves. For example, this code in MirrorCat.

marstr commented 6 years ago

Depending on heavy this code ends up being, portions of it may or may not end up living in a runtime.

The first HTTP mux that we've decided to support is Gorilla. We've done this because we're attracted to the idea of writing these as buffalo generators, and buffalo uses Gorilla.