NewHandler initializes the request handler with a plugin implementation.
(plugin Plugin)
| 108 | |
| 109 | // NewHandler initializes the request handler with a plugin implementation. |
| 110 | func NewHandler(plugin Plugin) *Handler { |
| 111 | h := &Handler{plugin, sdk.NewHandler(manifest)} |
| 112 | h.initMux() |
| 113 | return h |
| 114 | } |
| 115 | |
| 116 | func (h *Handler) initMux() { |
| 117 | h.handle(reqPath, func(req Request) Response { |