Documentation ¶
Index ¶
- type NginxManager
- func (ngx *NginxManager) IsHealthy() error
- func (ngx *NginxManager) ReadConfig(data string) (cfg *nginxConfiguration, err error)
- func (ngx *NginxManager) Reload(cfg *nginxConfiguration, servicesL4 []Service)
- func (ngx *NginxManager) Start()
- func (ngx *NginxManager) SyncIngress(ingList []interface{}) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NginxManager ¶
type NginxManager struct { // path to the configuration file to be used by nginx ConfigFile string // contains filtered or unexported fields }
NginxManager ...
func NewManager ¶
func NewManager(kubeClient *client.Client, defaultSvc, customErrorSvc Service, namespace string) *NginxManager
NewManager ...
func (*NginxManager) IsHealthy ¶
func (ngx *NginxManager) IsHealthy() error
IsHealthy checks if nginx is running
func (*NginxManager) ReadConfig ¶
func (ngx *NginxManager) ReadConfig(data string) (cfg *nginxConfiguration, err error)
ReadConfig obtains the configuration defined by the user or returns the default if it does not exists or if is not a well formed json object
func (*NginxManager) Reload ¶
func (ngx *NginxManager) Reload(cfg *nginxConfiguration, servicesL4 []Service)
Reload the master process receives the signal to reload configuration, it checks the syntax validity of the new configuration file and tries to apply the configuration provided in it. If this is a success, the master process starts new worker processes and sends messages to old worker processes, requesting them to shut down. Otherwise, the master process rolls back the changes and continues to work with the old configuration. Old worker processes, receiving a command to shut down, stop accepting new connections and continue to service current requests until all such requests are serviced. After that, the old worker processes exit. http://nginx.org/en/docs/beginners_guide.html#control
func (*NginxManager) Start ¶
func (ngx *NginxManager) Start()
Start starts a nginx (master process) and waits. If the process ends we need to kill the controller process and return the reason.
func (*NginxManager) SyncIngress ¶
func (ngx *NginxManager) SyncIngress(ingList []interface{}) error
SyncIngress creates a GET request to nginx to indicate that is required to refresh the Ingress rules.