Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { // The command to run. Command string `json:"command,omitempty"` // The command args. Args []string `json:"args,omitempty"` // The directory to run the command from. // Defaults to current directory. Directory string `json:"directory,omitempty"` // If the command should run in the foreground. // Setting it makes the command run in the foreground. Foreground bool `json:"foreground,omitempty"` // Timeout for the command. The command will be killed // after timeout has elapsed if it is still running. // Defaults to 10s. Timeout string `json:"timeout,omitempty"` // contains filtered or unexported fields }
Command module implements an HTTP handler that runs a shell command.
func (Command) CaddyModule ¶
func (Command) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Command) UnmarshalCaddyfile ¶
UnmarshalCaddyfile configures the plugin from Caddyfile. Syntax:
command [<matcher>] <command> [args...] { args <text>... directory <text> timeout <duration> foreground }
Click to show internal directories.
Click to hide internal directories.