mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-02 22:17:10 +08:00

Moved main method to top-level 'cmd' directory. Extracted the dockerfile to the root as well. Signed-off-by: Dejan Mijic <dejan@mainflux.com>
18 lines
371 B
Go
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
|
|
}
|
|
}
|