mirror of
https://github.com/mainflux/mainflux.git
synced 2025-05-01 13:48:56 +08:00

* Fix Dockerfile base Go version Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com> * Update Go version and dependencies Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
18 lines
617 B
Go
18 lines
617 B
Go
package sd
|
|
|
|
import (
|
|
"io"
|
|
|
|
"github.com/go-kit/kit/endpoint"
|
|
)
|
|
|
|
// Factory is a function that converts an instance string (e.g. host:port) to a
|
|
// specific endpoint. Instances that provide multiple endpoints require multiple
|
|
// factories. A factory also returns an io.Closer that's invoked when the
|
|
// instance goes away and needs to be cleaned up. Factories may return nil
|
|
// closers.
|
|
//
|
|
// Users are expected to provide their own factory functions that assume
|
|
// specific transports, or can deduce transports by parsing the instance string.
|
|
type Factory func(instance string) (endpoint.Endpoint, io.Closer, error)
|