Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2766c93
commit 0ad6191
Showing
7 changed files
with
35 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package loadbalancer | ||
|
||
import "github.com/go-kit/kit/endpoint" | ||
import ( | ||
"io" | ||
|
||
"github.com/go-kit/kit/endpoint" | ||
) | ||
|
||
// Factory is a function that converts an instance string, e.g. a host:port, | ||
// to a usable endpoint. Factories are used by load balancers to convert | ||
// instances returned by Publishers (typically host:port strings) into | ||
// endpoints. 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, Closer, error) | ||
|
||
// Closer is returned by factory functions as a way to close a generated | ||
// endpoint. | ||
type Closer chan struct{} | ||
type Factory func(instance string) (endpoint.Endpoint, io.Closer, error) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters