Documentation
¶
Index ¶
- type Manager
- func (m *Manager) ConfigPath() string
- func (m *Manager) CreateMultiDomainVirtualHost(deployment *models.Deployment) error
- func (m *Manager) CreateVirtualHost(deployment *models.Deployment) error
- func (m *Manager) DeleteVirtualHost(deploymentName string) error
- func (m *Manager) GetSecurityHookStatus(deploymentName string) (*SecurityHookStatus, error)
- func (m *Manager) GetVhostsUsingSSLDomain(domain string) []string
- func (m *Manager) GetVirtualHost(deploymentName string) (string, error)
- func (m *Manager) ListVirtualHosts() ([]VirtualHostInfo, error)
- func (m *Manager) ProbeTarget(service string, port int) (listening bool, checked bool)
- func (m *Manager) Reload() error
- func (m *Manager) RemoveDeploymentRateLimits(deploymentName string) error
- func (m *Manager) RenderVirtualHost(deployment *models.Deployment) (string, error)
- func (m *Manager) RenderVirtualHostWithBackends(deployment *models.Deployment, backends map[string][]UpstreamBackend) (string, error)
- func (m *Manager) SetStaplingChecker(fn func(sslDomain string) bool)
- func (m *Manager) TestConfig() error
- func (m *Manager) UpdateConfig(cfg *config.NginxConfig, deploymentsPath string, webrootPath string)
- func (m *Manager) UpdateDeploymentRateLimits(deploymentName string, rateLimits []models.DeploymentRateLimit) error
- func (m *Manager) UpdateVirtualHost(deployment *models.Deployment) error
- func (m *Manager) ValidateSecurityHooks(deploymentName string, shouldHaveHooks bool) error
- func (m *Manager) VirtualHostExists(deploymentName string) bool
- func (m *Manager) WriteVirtualHost(deploymentName string, content string) error
- type SecurityHookStatus
- type UpstreamBackend
- type VirtualHostInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(cfg *config.NginxConfig, deploymentsPath string, webrootPath string) *Manager
func (*Manager) ConfigPath ¶
func (*Manager) CreateMultiDomainVirtualHost ¶ added in v0.1.5
func (m *Manager) CreateMultiDomainVirtualHost(deployment *models.Deployment) error
func (*Manager) CreateVirtualHost ¶
func (m *Manager) CreateVirtualHost(deployment *models.Deployment) error
func (*Manager) DeleteVirtualHost ¶
func (*Manager) GetSecurityHookStatus ¶ added in v0.1.5
func (m *Manager) GetSecurityHookStatus(deploymentName string) (*SecurityHookStatus, error)
GetSecurityHookStatus returns detailed info about security hooks in a vhost
func (*Manager) GetVhostsUsingSSLDomain ¶ added in v0.1.5
func (*Manager) GetVirtualHost ¶
func (*Manager) ListVirtualHosts ¶
func (m *Manager) ListVirtualHosts() ([]VirtualHostInfo, error)
func (*Manager) ProbeTarget ¶
ProbeTarget checks, from inside the nginx container, whether service:port accepts a TCP connection, using the same name resolution the proxy itself uses. The second return value is false when the check could not be performed (no probe tool in the image, nginx container unavailable, unsupported flags), so callers can stay silent instead of reporting a false dead route.
func (*Manager) RemoveDeploymentRateLimits ¶ added in v0.1.5
RemoveDeploymentRateLimits removes rate limit zones for a deployment
func (*Manager) RenderVirtualHost ¶ added in v0.3.0
func (m *Manager) RenderVirtualHost(deployment *models.Deployment) (string, error)
RenderVirtualHost returns the config that CreateVirtualHost would write, without touching disk or nginx.
func (*Manager) RenderVirtualHostWithBackends ¶
func (m *Manager) RenderVirtualHostWithBackends(deployment *models.Deployment, backends map[string][]UpstreamBackend) (string, error)
func (*Manager) SetStaplingChecker ¶
SetStaplingChecker injects a predicate that reports whether ssl_stapling should be enabled for an SSL domain (true when its certificate advertises an OCSP responder). When left unset, stapling stays enabled, preserving prior behaviour.
func (*Manager) TestConfig ¶
func (*Manager) UpdateConfig ¶ added in v0.1.5
func (m *Manager) UpdateConfig(cfg *config.NginxConfig, deploymentsPath string, webrootPath string)
func (*Manager) UpdateDeploymentRateLimits ¶ added in v0.1.5
func (m *Manager) UpdateDeploymentRateLimits(deploymentName string, rateLimits []models.DeploymentRateLimit) error
UpdateDeploymentRateLimits writes per-deployment rate limit zones to rate_limits.conf
func (*Manager) UpdateVirtualHost ¶
func (m *Manager) UpdateVirtualHost(deployment *models.Deployment) error
func (*Manager) ValidateSecurityHooks ¶ added in v0.1.5
ValidateSecurityHooks checks that a vhost has the correct security hooks based on the expected state
func (*Manager) VirtualHostExists ¶
type SecurityHookStatus ¶ added in v0.1.5
type SecurityHookStatus struct {
HasHooks bool `json:"has_hooks"`
HookLocations []string `json:"hook_locations"`
ProperlyConfigured bool `json:"properly_configured"`
}
SecurityHookStatus returns details about security hooks in a vhost