Documentation
¶
Index ¶
Constants ¶
View Source
const ( FormatRed = "\033[31m%s\033[0m" FormatGreen = "\033[32m%s\033[0m" FormatYellow = "\033[33m%s\033[0m" FormatBlue = "\033[34m%s\033[0m" )
View Source
const Name = "kelvins-balancer"
Variables ¶
View Source
var (
Debug bool
)
Functions ¶
func RPCClientDialOptionAppend ¶
func RPCClientDialOptionAppend(opts []grpc.DialOption)
RPCClientDialOptionAppend only executed at boot load, so no locks are used
Types ¶
type ConnClient ¶
type ConnClient struct {
ServerName string
}
func NewConnClient ¶
func NewConnClient(serviceName string) (*ConnClient, error)
func (*ConnClient) GetConn ¶
func (c *ConnClient) GetConn(ctx context.Context, opts ...grpc.DialOption) (*grpc.ClientConn, error)
GetConn return a valid connection as much as possible
func (*ConnClient) GetEndpoints ¶
func (c *ConnClient) GetEndpoints(ctx context.Context) (endpoints []string, err error)
GetEndpoints the returned endpoint list may have invalid nodes
Click to show internal directories.
Click to hide internal directories.