client

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLoadBalancer = "round_robin"
View Source
const DefaultServiceConfig = `{
  "loadBalancingPolicy": "round_robin",
  "healthCheckConfig": {
    "serviceName": ""
  }
}`

https://github.com/grpc/grpc/blob/master/doc/service_config.md

Variables

This section is empty.

Functions

func Connect

func Connect(cfg *Config) (*grpc.ClientConn, error)

func LoadTLSConfig

func LoadTLSConfig(cfg *TLSConfig) (tlsConfig *tls.Config, err error)

Types

type Config

type Config struct {
	Address       string
	ServiceConfig string
	LoadBalancer  string
	TLS           bool
	TLSConfig     *TLSConfig
	DialOptions   []grpc.DialOption
}

func WithFlags

func WithFlags(prefix string, cfg *Config) (*Config, []cli.Flag)

type TLSConfig

type TLSConfig struct {
	CertPath string
	KeyPath  string
	CAPath   string
}

Jump to

Keyboard shortcuts

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