Documentation ¶
Overview ¶
The `nginx` task spawns an nginx server, and can test and reload the nginx configuration.
Index ¶
- Constants
- func IsExecAny(mode os.FileMode) bool
- func NewWithPlugin(p Plugin, label string) (*t, error)
- type CallbackFn
- type Cmd
- type Config
- type Event
- type File
- type HealthResponse
- type Plugin
- func (p Plugin) Available() string
- func (p Plugin) Config() string
- func (p Plugin) Enabled() string
- func (p Plugin) Env() map[string]string
- func (p Plugin) Flags() []string
- func (p Plugin) Name() string
- func (p Plugin) New(parent context.Context, provider iface.Provider) (iface.Task, error)
- func (p Plugin) Path() string
- func (p Plugin) Prefix() string
Constants ¶
View Source
const ( ScopeRead = "github.com/mutablelogic/go-server/nginx:read" ScopeWrite = "github.com/mutablelogic/go-server/nginx:write" )
Variables ¶
This section is empty.
Functions ¶
func NewWithPlugin ¶
Create a new logger task with provider of other tasks
Types ¶
type CallbackFn ¶
Callback output from the command. Newlines are embedded within the string
type Cmd ¶
type Cmd struct {
Out, Err CallbackFn
Start, Stop time.Time
// contains filtered or unexported fields
}
func NewWithCommand ¶
Create a new command with arguments
type Config ¶
type Config struct { sync.RWMutex // Configuration Files Files map[string]*File // contains filtered or unexported fields }
type File ¶
type File struct { // Path to the file Path string // Info for the file Info fs.FileInfo // Enabled indicates the configuration file is enabled Enabled bool }
func (*File) AvailableBase ¶
Return the "enabled" name of the file
func (*File) EnabledBase ¶
Return the "enabled" name of the file
type HealthResponse ¶ added in v1.1.3
type Plugin ¶
type Plugin struct { task.Plugin Path_ types.String `json:"path,omitempty"` // Path to the nginx binary Config_ types.String `json:"config,omitempty"` // Path to the configuration file Prefix_ types.String `json:"prefix,omitempty"` // Prefix for nginx configuration Available_ types.String `json:"available,omitempty"` // Path to available configurations Enabled_ types.String `json:"enabled,omitempty"` // Path to enabled configurations Env_ map[string]types.String `json:"env,omitempty"` // Environment variable map Directive_ map[string]types.String `json:"directive,omitempty"` // Directive map }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.