Documentation ¶
Index ¶
- func Client(c net.Conn, config *tls.Config) net.Conn
- func Server(c net.Conn, config *tls.Config) net.Conn
- type Certificate
- type Config
- func (c *Config) BuildCertificates() []tls.Certificate
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetAllowInsecure() bool
- func (m *Config) GetCertificate() []*Certificate
- func (m *Config) GetNextProtocol() []string
- func (m *Config) GetServerName() string
- func (c *Config) GetTLSConfig() *tls.Config
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Certificate ¶
type Certificate struct { // TLS certificate in x509 format. Certificate []byte `protobuf:"bytes,1,opt,name=Certificate,proto3" json:"Certificate,omitempty"` // TLS key in x509 format. Key []byte `protobuf:"bytes,2,opt,name=Key,proto3" json:"Key,omitempty"` }
func (*Certificate) Descriptor ¶
func (*Certificate) Descriptor() ([]byte, []int)
func (*Certificate) GetCertificate ¶
func (m *Certificate) GetCertificate() []byte
func (*Certificate) GetKey ¶
func (m *Certificate) GetKey() []byte
func (*Certificate) ProtoMessage ¶
func (*Certificate) ProtoMessage()
func (*Certificate) Reset ¶
func (m *Certificate) Reset()
func (*Certificate) String ¶
func (m *Certificate) String() string
type Config ¶
type Config struct { // Whether or not to allow self-signed certificates. AllowInsecure bool `protobuf:"varint,1,opt,name=allow_insecure,json=allowInsecure" json:"allow_insecure,omitempty"` // List of certificates to be served on server. Certificate []*Certificate `protobuf:"bytes,2,rep,name=certificate" json:"certificate,omitempty"` // Override server name. ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName" json:"server_name,omitempty"` // Lists of string as ALPN values. NextProtocol []string `protobuf:"bytes,4,rep,name=next_protocol,json=nextProtocol" json:"next_protocol,omitempty"` }
func (*Config) BuildCertificates ¶
func (c *Config) BuildCertificates() []tls.Certificate
func (*Config) Descriptor ¶
func (*Config) GetAllowInsecure ¶
func (*Config) GetCertificate ¶
func (m *Config) GetCertificate() []*Certificate
func (*Config) GetNextProtocol ¶
func (*Config) GetServerName ¶
func (*Config) GetTLSConfig ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
type Option ¶
type Option func(*Config)
func WithDestination ¶
func WithDestination(dest net.Destination) Option
func WithNextProto ¶
Click to show internal directories.
Click to hide internal directories.