Documentation
¶
Index ¶
- Constants
- type Config
- type Conn
- type ConnID
- type Server
- type TLSConf
- func (config *TLSConf) IsTLSEnabled() bool
- func (config *TLSConf) SetClientAuthType(authType tls.ClientAuthType)
- func (config *TLSConf) SetRootCertFiles(files ...string) error
- func (config *TLSConf) SetRootCerts(certs ...[]byte)
- func (config *TLSConf) SetServerCert(cert []byte)
- func (config *TLSConf) SetServerCertFile(file string) error
- func (config *TLSConf) SetServerKey(key []byte)
- func (config *TLSConf) SetServerKeyFile(file string) error
- func (config *TLSConf) SetTLSConfig(tlsConfig *tls.Config)
- func (config *TLSConf) SetTLSEnabled(enabled bool)
- func (config *TLSConf) TLSConfig() (*tls.Config, error)
Constants ¶
View Source
const (
Version = ".."
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
*TLSConf
// contains filtered or unexported fields
}
Config stores server configuration parammeters.
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns a default configuration instance.
func (*Config) SetAddress ¶
SetAddress sets a listen address to the configuration.
type TLSConf ¶
type TLSConf struct {
ClientAuthType tls.ClientAuthType
ServerCert []byte
ServerKey []byte
RootCerts [][]byte
// contains filtered or unexported fields
}
TLSConf represents a TLS configuration.
func (*TLSConf) IsTLSEnabled ¶
IsEnabled returns true if the TLS is enabled.
func (*TLSConf) SetClientAuthType ¶
func (config *TLSConf) SetClientAuthType(authType tls.ClientAuthType)
SetClientAuthType sets a client authentication type.
func (*TLSConf) SetRootCertFiles ¶
SetRootCertFile sets a SSL root certificates.
func (*TLSConf) SetRootCerts ¶
SetRootCerts sets a SSL root certificates.
func (*TLSConf) SetServerCert ¶
SetServerCert sets a SSL server certificate.
func (*TLSConf) SetServerCertFile ¶
SetServerCertFile sets a SSL server certificate file.
func (*TLSConf) SetServerKey ¶
SetServerKey sets a SSL server key.
func (*TLSConf) SetServerKeyFile ¶
SetServerKeyFile sets a SSL server key file.
func (*TLSConf) SetTLSConfig ¶
SetTLSConfig sets a TLS configuration.
func (*TLSConf) SetTLSEnabled ¶
SetTLSEnabled sets a TLS enabled flag.
Click to show internal directories.
Click to hide internal directories.