1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-02 22:17:10 +08:00
Mainflux.mainflux/http/api/endpoint.go
Dejan Mijic 26a2ea1ce1
Integrate http adapter service
Moved main method to top-level 'cmd' directory. Extracted the dockerfile
to the root as well.

Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2017-09-23 01:57:14 +02:00

18 lines
371 B
Go

package api
import (
"context"
"github.com/go-kit/kit/endpoint"
"github.com/mainflux/mainflux/http"
"github.com/mainflux/mainflux/writer"
)
func sendMessageEndpoint(svc http.Service) endpoint.Endpoint {
return func(_ context.Context, request interface{}) (interface{}, error) {
messages := request.([]writer.Message)
svc.Send(messages)
return nil, nil
}
}