Versions in this module Expand all Collapse all v0 v0.1.1 Apr 1, 2017 v0.1.0 Apr 1, 2017 Changes in this version + const HTTPCfg + const LocalCfg + const StreamCfg + const StreamHTTPCfg + func GetMapKeyAsBool(m map[string]string, key string, context apiObject) (bool, bool, error) + func GetMapKeyAsInt(m map[string]string, key string, context apiObject) (int64, bool, error) + func GetMapKeyAsStringSlice(m map[string]string, key string, context apiObject, delimiter string) ([]string, bool, error) + func IsStreamUpstreamDefault(su StreamUpstream) bool + type Configuration uint8 + type Configurator struct + func NewConfigurator(ngxc *NginxController) *Configurator + func (cfgtor *Configurator) AddOrUpdateDHParam(content string) (string, error) + func (cfgtor *Configurator) AddOrUpdateIngress(name string, ingEx *IngressEx) error + func (cfgtor *Configurator) AddOrUpdateNode(key string, ip string, active bool) error + func (cfgtor *Configurator) AddOrUpdateService(name string, svc *ServiceSpec) error + func (cfgtor *Configurator) DeleteConfiguration(name string, cfgType Configuration) + func (cfgtor *Configurator) DeleteNode(key string) error + func (cfgtor *Configurator) UpdateIngressEndpoints(name string, ingEx *IngressEx) error + func (cfgtor *Configurator) UpdateMainConfigHTTPContext(config *HTTPContext) error + func (cfgtor *Configurator) UpdateServiceEndpoints(name string, svc *ServiceSpec) error + type HTTPContext struct + ClientMaxBodySize string + HSTS bool + HSTSIncludeSubdomains bool + HSTSMaxAge int64 + HTTP2 bool + LocationSnippets []string + MainHTTPSnippets []string + MainLogFormat string + MainServerNamesHashBucketSize string + MainServerNamesHashMaxSize string + MainServerSSLCiphers string + MainServerSSLDHParam string + MainServerSSLPreferServerCiphers bool + MainServerSSLProtocols string + ProxyBufferSize string + ProxyBuffering bool + ProxyBuffers string + ProxyConnectTimeout string + ProxyHideHeaders []string + ProxyMaxTempFileSize string + ProxyPassHeaders []string + ProxyProtocol bool + ProxyReadTimeout string + RealIPHeader string + RealIPRecursive bool + RedirectToHTTPS bool + ServerSnippets []string + ServerTokens bool + SetRealIPFrom []string + func NewDefaultHTTPContext() *HTTPContext + type HTTPNginxConfig struct + Servers []Server + Upstreams []Upstream + type IngressEx struct + Endpoints map[string][]string + Ingress *extensions.Ingress + Secrets map[string]*api.Secret + type Location struct + ClientMaxBodySize string + LocationSnippets []string + Path string + ProxyBufferSize string + ProxyBuffering bool + ProxyBuffers string + ProxyConnectTimeout string + ProxyMaxTempFileSize string + ProxyReadTimeout string + Rewrite string + SSL bool + Upstream Upstream + Websocket bool + type NginxController struct + func NewNginxController(cfgType Configuration, nginxConfPath string, healthStatus bool) (*NginxController, error) + func (ngxc *NginxController) AddOrUpdateCertAndKey(name string, cert string, key string) string + func (ngxc *NginxController) AddOrUpdateDHParam(dhparam string) (string, error) + func (ngxc *NginxController) AddOrUpdateHTTPConfiguration(name string, config HTTPNginxConfig) + func (ngxc *NginxController) AddOrUpdateStream(name string, config StreamNginxConfig) + func (ngxc *NginxController) DeleteHTTPConfiguration(name string) + func (ngxc *NginxController) DeleteStreamConfiguration(name string) + func (ngxc *NginxController) Reload() error + func (ngxc *NginxController) Start() + func (ngxc *NginxController) UpdateMainConfigFile() + type NginxMainConfig struct + Daemon bool + DefaultHTTPContext bool + DefaultStreamContext bool + Environment map[string]string + ErrorLogFile string + ErrorLogLevel string + EventContext NginxMainEventConfig + Group string + HTTPContext NginxMainHTTPConfig + LockFile string + PidFile string + User string + WorkerPriority string + WorkerProcesses string + WorkingDirectory string + type NginxMainEventConfig struct + AcceptMutex bool + AcceptMutexDelay string + MultiAccept bool + WorkerConnections string + type NginxMainHTTPConfig struct + HTTPSnippets []string + HealthStatus bool + LogFormat string + SSLCiphers string + SSLDHParam string + SSLPreferServerCiphers bool + SSLProtocols string + ServerNamesHashBucketSize string + ServerNamesHashMaxSize string + type Server struct + HSTS bool + HSTSIncludeSubdomains bool + HSTSMaxAge int64 + HTTP2 bool + Locations []Location + Name string + ProxyHideHeaders []string + ProxyPassHeaders []string + ProxyProtocol bool + RealIPHeader string + RealIPRecursive bool + RedirectToHTTPS bool + SSL bool + SSLCertificate string + SSLCertificateKey string + ServerSnippets []string + ServerTokens bool + SetRealIPFrom []string + type ServiceSpec struct + Endpoints map[string][]string + Key string + Service *v1.Service + type StreamListen struct + Address string + Port string + UDP bool + type StreamNginxConfig struct + Resolver string + Servers []StreamServer + Upstreams []StreamUpstream + type StreamServer struct + Listen StreamListen + ProxyPassAddress string + ProxyProtocol bool + ProxyProtocolTimeout string + type StreamUpstream struct + Algorithm string + LeastTimeMethod string + Name string + UpstreamServers []StreamUpstreamServer + func NewStreamUpstreamWithDefaultServer(name string) StreamUpstream + type StreamUpstreamServer struct + Address string + Backup bool + Down bool + FailTimeout string + MaxConns string + MaxFails string + Weight string + type Upstream struct + Name string + UpstreamServers []UpstreamServer + func NewUpstreamWithDefaultServer(name string) Upstream + type UpstreamServer struct + Address string + Port string