Documentation
¶
Index ¶
- type Adapter
- func CreateBuffaloAdapter(host, dir string) (Adapter, error)
- func CreateHugoAdapter(host, dir string) (Adapter, error)
- func CreatePhoenixAdapter(host, dir string) (Adapter, error)
- func CreateProxyAdapter(host, proxy string) (Adapter, error)
- func CreateRailsAdapter(host, dir string) (Adapter, error)
- func CreateStaticAdapter(dir string) (Adapter, error)
- type AppProxyAdapter
- type ProxyAdapter
- type StaticAdapter
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface {
Start() error
Stop(reason error) error
Status() Status
WriteLog(io.Writer)
ServeHTTP(w http.ResponseWriter, r *http.Request)
}
Adapter defines the interface for an Adapter implementation
func CreateBuffaloAdapter ¶ added in v0.2.0
CreateBuffaloAdapter creates a new buffalo adapter
func CreateHugoAdapter ¶ added in v0.3.0
CreateHugoAdapter creates a new hugo adapter
func CreatePhoenixAdapter ¶
CreatePhoenixAdapter creates a new phoenix adapter
func CreateProxyAdapter ¶
CreateProxyAdapter creates a new proxy
func CreateRailsAdapter ¶
CreateRailsAdapter creates a new rails adapter
func CreateStaticAdapter ¶
CreateStaticAdapter creates a new static HTML application
type AppProxyAdapter ¶ added in v0.2.0
type AppProxyAdapter struct {
sync.Mutex
Host string
Dir string
Port string
ShellCommand string
EnvPortName string
RestartPatterns []*regexp.Regexp
State Status
BootLog string
Pid int
// contains filtered or unexported fields
}
AppProxyAdapter holds the state for the application
func (*AppProxyAdapter) ServeHTTP ¶ added in v0.2.0
func (a *AppProxyAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface
func (*AppProxyAdapter) Start ¶ added in v0.2.0
func (a *AppProxyAdapter) Start() error
Start starts the application
func (*AppProxyAdapter) Status ¶ added in v0.3.0
func (a *AppProxyAdapter) Status() Status
Status returns the status of the adapter
func (*AppProxyAdapter) Stop ¶ added in v0.2.0
func (a *AppProxyAdapter) Stop(reason error) error
Stop stops the application
func (*AppProxyAdapter) WriteLog ¶ added in v0.2.0
func (a *AppProxyAdapter) WriteLog(w io.Writer)
WriteLog writes the log to the given writer
type ProxyAdapter ¶
type ProxyAdapter struct {
Host string
Proxy string
State Status
BootLog string
// contains filtered or unexported fields
}
ProxyAdapter holds the state for the application
func (*ProxyAdapter) Command ¶
func (a *ProxyAdapter) Command() *exec.Cmd
Command doesn't do anything
func (*ProxyAdapter) ServeHTTP ¶
func (a *ProxyAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface
func (*ProxyAdapter) Status ¶ added in v0.3.0
func (a *ProxyAdapter) Status() Status
Status returns the status of the proxy
func (*ProxyAdapter) WriteLog ¶
func (a *ProxyAdapter) WriteLog(w io.Writer)
WriteLog doesn't do anything
type StaticAdapter ¶
StaticAdapter holds the state for the application
func (*StaticAdapter) Command ¶
func (d *StaticAdapter) Command() *exec.Cmd
Command doesn't do anything
func (*StaticAdapter) ServeHTTP ¶
func (d *StaticAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements the http.Handler interface
func (*StaticAdapter) Status ¶ added in v0.3.0
func (d *StaticAdapter) Status() Status
Status returns the status of the adapter
func (*StaticAdapter) Stop ¶
func (d *StaticAdapter) Stop(reason error) error
Stop doesn't do anything
func (*StaticAdapter) WriteLog ¶
func (d *StaticAdapter) WriteLog(w io.Writer)
WriteLog doesn't do anything
type Status ¶ added in v0.3.0
type Status string
Status defines the possible states of the adapter
const ( // StatusStarting is the initial state of the adapter StatusStarting Status = "starting" // StatusRunning is the successful running state of the adapter StatusRunning Status = "running" // StatusStopping is the state when an adapter is stopping StatusStopping Status = "stopping" // StatusStopped is the state when an adapter has been stopped StatusStopped Status = "stopped" // StatusError is the state when an error has occurred StatusError Status = "error" )