Documentation ¶
Index ¶
- Constants
- type Address
- type BaseTemplate
- type CertChain
- type Cluster
- type CommonTLSContext
- type Config
- type EnvoyConf
- type EnvoyConfParser
- type Filter
- type FilterChain
- type Host
- type Listener
- type NginxConfig
- type PortAndCiphers
- type PrivateKey
- type Resource
- type Sds
- type SdsCredParser
- type SdsServerValidation
- type SdsServerValidationParser
- type SocketAddress
- type StaticResources
- type TLSCertificate
- type TLSContext
- type TLSParams
- type TrustedCA
- type ValidationContext
- type ValidationResource
Constants ¶
View Source
const FilePerm = 0644
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct {
SocketAddress SocketAddress `yaml:"socket_address,omitempty"`
}
type BaseTemplate ¶
type CommonTLSContext ¶ added in v0.6.0
type CommonTLSContext struct {
TLSParams TLSParams `yaml:"tls_params,omitempty"`
}
type EnvoyConf ¶
type EnvoyConf struct {
StaticResources StaticResources `yaml:"static_resources,omitempty"`
}
type EnvoyConfParser ¶
type EnvoyConfParser struct{}
func NewEnvoyConfParser ¶
func NewEnvoyConfParser() EnvoyConfParser
func (EnvoyConfParser) GetClusters ¶
func (e EnvoyConfParser) GetClusters(conf EnvoyConf) (clusters []Cluster, nameToPortAndCiphersMap map[string]PortAndCiphers)
Parses the Envoy conf file and extracts the clusters and a map of cluster names to listeners
func (EnvoyConfParser) GetMTLS ¶ added in v0.4.0
func (e EnvoyConfParser) GetMTLS(conf EnvoyConf) bool
Checks if MTLS is enabled in the Envoy conf file. Defaults to returning false if require_client_certificate isn't set.
func (EnvoyConfParser) ReadUnmarshalEnvoyConfig ¶ added in v0.4.0
func (e EnvoyConfParser) ReadUnmarshalEnvoyConfig(envoyConfFile string) (EnvoyConf, error)
Read Envoy conf file and unmarshal it
type FilterChain ¶
type FilterChain struct { Filters []Filter `yaml:"filters,omitempty"` TLSContext TLSContext `yaml:"tls_context,omitempty"` }
type Host ¶
type Host struct {
SocketAddress SocketAddress `yaml:"socket_address,omitempty"`
}
type Listener ¶
type Listener struct { Address Address `yaml:"address,omitempty"` FilterChains []FilterChain `yaml:"filter_chains,omitempty"` }
type NginxConfig ¶
type NginxConfig struct {
// contains filtered or unexported fields
}
func NewNginxConfig ¶
func NewNginxConfig(envoyConfParser envoyConfParser, sdsCredParser sdsCredParser, sdsValidationParser sdsValidationParser, nginxDir string) NginxConfig
func (NginxConfig) Generate ¶
func (n NginxConfig) Generate(envoyConfFile string) error
Generates NGINX config file.
func (NginxConfig) GetConfFile ¶
func (n NginxConfig) GetConfFile() string
func (NginxConfig) GetNginxDir ¶ added in v0.4.1
func (n NginxConfig) GetNginxDir() string
func (NginxConfig) WriteTLSFiles ¶
func (n NginxConfig) WriteTLSFiles() error
type PortAndCiphers ¶ added in v0.6.0
type PrivateKey ¶
type PrivateKey struct {
InlineString string `yaml:"inline_string,omitempty"`
}
type Resource ¶
type Resource struct {
TLSCertificate TLSCertificate `yaml:"tls_certificate,omitempty"`
}
type SdsCredParser ¶
type SdsCredParser struct {
// contains filtered or unexported fields
}
func NewSdsCredParser ¶
func NewSdsCredParser(file string) SdsCredParser
func (SdsCredParser) GetCertAndKey ¶
func (p SdsCredParser) GetCertAndKey() (string, string, error)
Parses the Envoy SDS file and extracts the cert and key
type SdsServerValidation ¶
type SdsServerValidation struct {
Resources []ValidationResource `yaml:"resources,omitempty"`
}
type SdsServerValidationParser ¶
type SdsServerValidationParser struct {
// contains filtered or unexported fields
}
func NewSdsServerValidationParser ¶
func NewSdsServerValidationParser(file string) SdsServerValidationParser
func (SdsServerValidationParser) GetCACert ¶
func (p SdsServerValidationParser) GetCACert() (string, error)
type SocketAddress ¶
type StaticResources ¶
type TLSCertificate ¶
type TLSCertificate struct { CertChain CertChain `yaml:"certificate_chain,omitempty"` PrivateKey PrivateKey `yaml:"private_key,omitempty"` }
type TLSContext ¶ added in v0.4.0
type TLSContext struct { CommonTLSContext CommonTLSContext `yaml:"common_tls_context,omitempty"` RequireClientCertificate bool `yaml:"require_client_certificate,omitempty"` }
type TLSParams ¶ added in v0.6.0
type TLSParams struct {
CipherSuites []string `yaml:"cipher_suites,omitempty"`
}
type ValidationContext ¶
type ValidationContext struct {
TrustedCA TrustedCA `yaml:"trusted_ca,omitempty"`
}
type ValidationResource ¶
type ValidationResource struct {
ValidationContext ValidationContext `yaml:"validation_context,omitempty"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.