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 ¶ added in v1.5.1
func RPCClientDialOptionAppend(opts []grpc.DialOption)
RPCClientDialOptionAppend only executed at boot load, so no locks are used
Types ¶
type ConnClient ¶ added in v1.4.2
type ConnClient struct {
ServerName string
}
func NewConnClient ¶ added in v1.4.2
func NewConnClient(serviceName string) (*ConnClient, error)
func (*ConnClient) GetConn ¶ added in v1.4.2
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 ¶ added in v1.4.2
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.