Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidRootCrt = errors.New("failed to parse root certificate")
)
Functions ¶
This section is empty.
Types ¶
type Tls ¶
type Tls struct { Enable bool `json:"enable" yaml:"enable" env:"TLS_ENABLE" envDefault:"false"` SkipVerify bool `json:"skip_verify" yaml:"skip_verify" env:"TLS_SKIP_VERIFY"` FromFile bool `json:"from_file" yaml:"from_file" env:"TLS_FROM_FILE"` Key string `json:"key" yaml:"key" env:"TLS_KEY" ` // server.key Cert string `json:"cert" yaml:"cert" env:"TLS_CERT"` // client.crt CA string `json:"ca" yaml:"ca" env:"TLS_CA"` // server.crt }
func (Tls) GetServerTlsConfig ¶
func (t Tls) GetServerTlsConfig() (grpc.ServerOption, error)
GetServerTlsConfig for server
func (Tls) GetTLSLinkConfig ¶
func (t Tls) GetTLSLinkConfig() (credentials.TransportCredentials, error)
GetTLSLinkConfig for client
Click to show internal directories.
Click to hide internal directories.