6 "github.com/go-kit/kit/endpoint"
9 // Factory is a function that converts an instance string (e.g. host:port) to a
10 // specific endpoint. Instances that provide multiple endpoints require multiple
11 // factories. A factory also returns an io.Closer that's invoked when the
12 // instance goes away and needs to be cleaned up. Factories may return nil
15 // Users are expected to provide their own factory functions that assume
16 // specific transports, or can deduce transports by parsing the instance string.
17 type Factory func(instance string) (endpoint.Endpoint, io.Closer, error)