2016-06-30 22:21:57 +03:00
|
|
|
package http
|
|
|
|
|
|
|
|
import (
|
2020-10-10 00:38:35 +03:00
|
|
|
"github.com/unistack-org/micro/v3/registry"
|
|
|
|
"github.com/unistack-org/micro/v3/server"
|
2016-06-30 22:21:57 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type httpHandler struct {
|
|
|
|
opts server.HandlerOptions
|
2017-04-03 17:03:46 +03:00
|
|
|
eps []*registry.Endpoint
|
2016-06-30 22:21:57 +03:00
|
|
|
hd interface{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *httpHandler) Name() string {
|
|
|
|
return "handler"
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *httpHandler) Handler() interface{} {
|
|
|
|
return h.hd
|
|
|
|
}
|
|
|
|
|
|
|
|
func (h *httpHandler) Endpoints() []*registry.Endpoint {
|
2017-04-03 17:03:46 +03:00
|
|
|
return h.eps
|
2016-06-30 22:21:57 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
func (h *httpHandler) Options() server.HandlerOptions {
|
|
|
|
return h.opts
|
|
|
|
}
|