Add http server which implements go-micro.Server
This commit is contained in:
28
subscriber.go
Normal file
28
subscriber.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package http
|
||||
|
||||
import (
|
||||
"github.com/micro/go-micro/registry"
|
||||
"github.com/micro/go-micro/server"
|
||||
)
|
||||
|
||||
type httpSubscriber struct {
|
||||
opts server.SubscriberOptions
|
||||
topic string
|
||||
hd interface{}
|
||||
}
|
||||
|
||||
func (h *httpSubscriber) Topic() string {
|
||||
return h.topic
|
||||
}
|
||||
|
||||
func (h *httpSubscriber) Subscriber() interface{} {
|
||||
return h.hd
|
||||
}
|
||||
|
||||
func (h *httpSubscriber) Endpoints() []*registry.Endpoint {
|
||||
return []*registry.Endpoint{}
|
||||
}
|
||||
|
||||
func (h *httpSubscriber) Options() server.SubscriberOptions {
|
||||
return h.opts
|
||||
}
|
||||
Reference in New Issue
Block a user