1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-28 13:48:49 +08:00
Mainflux.mainflux/http/adapter.go
2018-05-11 01:00:10 +02:00

21 lines
546 B
Go

// Package http contains the domain concept definitions needed to support
// Mainflux http adapter service functionality.
package http
import "github.com/mainflux/mainflux"
var _ mainflux.MessagePublisher = (*adapterService)(nil)
type adapterService struct {
pub mainflux.MessagePublisher
}
// New instantiates the HTTP adapter implementation.
func New(pub mainflux.MessagePublisher) mainflux.MessagePublisher {
return &adapterService{pub}
}
func (as *adapterService) Publish(msg mainflux.RawMessage) error {
return as.pub.Publish(msg)
}