Documentation ¶
Overview ¶
You can use the "packr clean" command to clean up this, and any other packr generated files.
Index ¶
- type ConfigData
- type NginxConfig
- func (n *NginxConfig) DesiredConfiguration(sites []state.SiteState) (config ConfigData, err error)
- func (n *NginxConfig) EnsureServerRunning() error
- func (n *NginxConfig) ExistingConfiguration(sites []state.SiteState) (ConfigData, bool, error)
- func (n *NginxConfig) Init() error
- func (n *NginxConfig) RestartServer() error
- func (n *NginxConfig) Status() (bool, error)
- func (n *NginxConfig) SyncConfiguration(sites []state.SiteState) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigData ¶
ConfigData is a map of each configuration file and its content
type NginxConfig ¶
type NginxConfig struct {
// contains filtered or unexported fields
}
NginxConfig creates the configuration for nginx
var Instance *NginxConfig
Instance is a singleton for NginxConfig
func (*NginxConfig) DesiredConfiguration ¶
func (n *NginxConfig) DesiredConfiguration(sites []state.SiteState) (config ConfigData, err error)
DesiredConfiguration builds the list of files for the desired configuration for nginx
func (*NginxConfig) EnsureServerRunning ¶
func (n *NginxConfig) EnsureServerRunning() error
EnsureServerRunning starts the Nginx server if it's not running already
func (*NginxConfig) ExistingConfiguration ¶
func (n *NginxConfig) ExistingConfiguration(sites []state.SiteState) (ConfigData, bool, error)
ExistingConfiguration reads the list of files currently on disk, and deletes some extraneous ones already
func (*NginxConfig) Init ¶
func (n *NginxConfig) Init() error
Init initializes the object and loads the templates from file
func (*NginxConfig) RestartServer ¶
func (n *NginxConfig) RestartServer() error
RestartServer restarts the Nginx server
func (*NginxConfig) Status ¶
func (n *NginxConfig) Status() (bool, error)
Status returns the status of the Nginx server
func (*NginxConfig) SyncConfiguration ¶
func (n *NginxConfig) SyncConfiguration(sites []state.SiteState) (bool, error)
SyncConfiguration ensures that the configuration for the webserver matches the desired state