micro-client-http/publication.go

32 lines
572 B
Go
Raw Normal View History

2017-01-01 21:39:05 +03:00
package http
import (
"github.com/micro/go-micro/client"
)
type httpPublication struct {
topic string
contentType string
message interface{}
}
func newHTTPPublication(topic string, message interface{}, contentType string) client.Publication {
return &httpPublication{
message: message,
topic: topic,
contentType: contentType,
}
}
func (h *httpPublication) ContentType() string {
return h.contentType
}
func (h *httpPublication) Topic() string {
return h.topic
}
func (h *httpPublication) Message() interface{} {
return h.message
}