tls

package
v0.0.0-...-cda2eac Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: GPL-3.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CertPath           string `yaml:"cert_path" json:"cert_path"`
	KeyPath            string `yaml:"key_path" json:"key_path"`
	CAPath             string `yaml:"ca_path" json:"ca_path"`
	ServerName         string `yaml:"server_name" json:"server_name"`
	InsecureSkipVerify bool   `yaml:"insecure_skip_verify" json:"insecure_skip_verify"`
}

Config is the config for client TLS.

func (*Config) GetGRPCDialOptions

func (cfg *Config) GetGRPCDialOptions(enabled bool) ([]grpc.DialOption, error)

GetGRPCDialOptions creates GRPC DialOptions for TLS

func (*Config) GetTLSConfig

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

GetTLSConfig initialises tls.Config from config options

func (*Config) ParseFlags

func (cfg *Config) ParseFlags(f *flag.FlagSet)

ParseFlags parse flags with prefix.

func (*Config) ParseFlagsWithPrefix

func (cfg *Config) ParseFlagsWithPrefix(prefix string, f *flag.FlagSet)

ParseFlagsWithPrefix registers flags with prefix.

Jump to

Keyboard shortcuts

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