mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-27 13:48:49 +08:00

* MF-325 - Add SPDX license and copyright headers Signed-off-by: Ivan Milošević <iva@blokovi.com> * MF-325 - Add SPDX license and copyright headers Signed-off-by: Ivan Milošević <iva@blokovi.com> * MF-325 - Add SPDX license and copyright headers Signed-off-by: Ivan Milošević <iva@blokovi.com> * MF-325 - Add SPDX license and copyright headers Signed-off-by: Ivan Milošević <iva@blokovi.com> * MF-325 - Change mainflux version from 0.4.0 to 0.5.0 Signed-off-by: Ivan Milošević <iva@blokovi.com>
28 lines
629 B
Go
28 lines
629 B
Go
//
|
|
// Copyright (c) 2018
|
|
// Mainflux
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
// 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)
|
|
}
|