pkg

package
v0.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTLSConfig

func NewTLSConfig(c TLSConfig) (*tls.Config, error)

func RandStr

func RandStr() string

Types

type AuthConfig

type AuthConfig struct {
	Username string `yaml:"username,omitempty"`
	Password string `yaml:"password,omitempty"`
	ClientID string `yaml:"clientId,omitempty"`
}

type Config

type Config struct {
	Address string        `yaml:"address,omitempty"`
	Timeout time.Duration `yaml:"timeout,omitempty"`
	TLS     TLSConfig     `yaml:"tls,omitempty"`
	Auth    AuthConfig    `yaml:"auth,omitempty"`
}

type GRPClient

type GRPClient struct {
	// contains filtered or unexported fields
}

func NewGRPCClient

func NewGRPCClient(cfg *Config) (*GRPClient, error)

func (*GRPClient) Connect

func (client *GRPClient) Connect(ctx context.Context, address string) (*grpc.ClientConn, error)

type TLSConfig

type TLSConfig struct {
	CAs        []string `yaml:"cas,omitempty"`
	Cert       string   `yaml:"cert,omitempty"`
	Key        string   `yaml:"key,omitempty"`
	SkipVerify bool     `yaml:"skipVerify,omitempty"`
}

Jump to

Keyboard shortcuts

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