Help us shape the future of Go! Take the 2026 Go Developer Survey

tls

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	CertPath           string `yaml:"tls_cert_path"`
	KeyPath            string `yaml:"tls_key_path"`
	CAPath             string `yaml:"tls_ca_path"`
	InsecureSkipVerify bool   `yaml:"tls_insecure_skip_verify"`
}

ClientConfig is the config for client TLS.

func (*ClientConfig) GetGRPCDialOptions

func (cfg *ClientConfig) GetGRPCDialOptions() ([]grpc.DialOption, error)

GetGRPCDialOptions creates GRPC DialOptions for TLS

func (*ClientConfig) GetTLSConfig

func (cfg *ClientConfig) GetTLSConfig() (*tls.Config, error)

GetTLSConfig initialises tls.Config from config options

func (*ClientConfig) RegisterFlagsWithPrefix

func (cfg *ClientConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

RegisterFlagsWithPrefix registers flags with prefix.

Jump to

Keyboard shortcuts

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