Documentation ¶
Index ¶
Constants ¶
const ( VersionTLSDefaultMin = tls.VersionTLS12 VersionTLSDefaultMax = tls.VersionTLS13 )
const DefaultIPv4 = "127.0.0.1"
const DefaultPort = 3000
Variables ¶
This section is empty.
Functions ¶
func LoadCACerts ¶
LoadCACerts returns CA set of certificates (cert pool) reads CA certificate based on the certConfig and adds it to the pool
func LoadServerCertAndKey ¶
func LoadServerCertAndKey(certFileBytes, keyFileBytes, keyPassBytes []byte) ([]tls.Certificate, error)
LoadServerCertAndKey reads server certificate and associated key file based on certConfig and keyConfig returns parsed server certificate if the private key is encrypted, it will be decrypted using key file passphrase
Types ¶
type AerospikeConfig ¶
type AerospikeConfig struct { Seeds HostTLSPortSlice User string Password string AuthMode as.AuthMode TLS *TLSConfig }
AerospikeConfig represents the intermediate configuration for an Aerospike client. This can be constructed directly using flags.AerospikeFlags or
func NewDefaultAerospikeConfig ¶
func NewDefaultAerospikeConfig() *AerospikeConfig
NewDefaultAerospikeConfig creates a new default AerospikeConfig instance.
func (*AerospikeConfig) NewClientPolicy ¶
func (ac *AerospikeConfig) NewClientPolicy() (*as.ClientPolicy, error)
NewClientPolicy creates a new Aerospike client policy based on the AerospikeConfig.
func (*AerospikeConfig) NewHosts ¶
func (ac *AerospikeConfig) NewHosts() []*as.Host
type HostTLSPort ¶
func NewDefaultHostTLSPort ¶
func NewDefaultHostTLSPort() *HostTLSPort
func NewHostTLSPort ¶
func NewHostTLSPort() *HostTLSPort
func (*HostTLSPort) String ¶
func (addr *HostTLSPort) String() string
type HostTLSPortSlice ¶
type HostTLSPortSlice []*HostTLSPort
func (*HostTLSPortSlice) String ¶
func (slice *HostTLSPortSlice) String() string
type TLSConfig ¶
type TLSConfig struct { RootCA [][]byte Cert []byte Key []byte KeyPass []byte TLSProtocolsMinVersion TLSProtocol TLSProtocolsMaxVersion TLSProtocol }
TLSConfig is a struct that holds the TLS configuration for the client. It is an intermediate type that integrates nicely with our flags.
func NewTLSConfig ¶
func NewTLSConfig(rootCA [][]byte, cert, key, keyPass []byte, min, max TLSProtocol) *TLSConfig
NewTLSConfig returns a new TLSConfig that can later be used to create a tls.Config that can be passed to a go client. It is a intermediate type that integrates nicely with our flags.
type TLSProtocol ¶
type TLSProtocol uint16
func (TLSProtocol) String ¶
func (p TLSProtocol) String() string