client_conn

package
v1.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2024 License: BSD-3-Clause Imports: 28 Imported by: 21

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 Blue added in v1.6.0

func Blue(msg string) string

func Green added in v1.6.0

func Green(msg string) string

func RPCClientDialOptionAppend added in v1.5.1

func RPCClientDialOptionAppend(opts []grpc.DialOption)

RPCClientDialOptionAppend only executed at boot load, so no locks are used

func Red added in v1.6.0

func Red(msg string) string

func Yellow added in v1.6.0

func Yellow(msg string) string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL