Documentation ¶
Overview ¶
Caddy plugin that provides native support for Python WSGI apps.
Index ¶
- type CaddySnake
- func (CaddySnake) CaddyModule() caddy.ModuleInfo
- func (m *CaddySnake) Cleanup() error
- func (f *CaddySnake) Provision(ctx caddy.Context) error
- func (f CaddySnake) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
- func (f *CaddySnake) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (m *CaddySnake) Validate() error
- type RequestHandler
- type Wsgi
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaddySnake ¶
type CaddySnake struct { ModuleName string `json:"module_name,omitempty"` VenvPath string `json:"venv_path,omitempty"` // contains filtered or unexported fields }
CaddySnake module that communicates with a Wsgi app to handle requests
func (CaddySnake) CaddyModule ¶
func (CaddySnake) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*CaddySnake) Cleanup ¶
func (m *CaddySnake) Cleanup() error
Cleanup frees resources uses by module
func (*CaddySnake) Provision ¶
func (f *CaddySnake) Provision(ctx caddy.Context) error
Provision sets up the module.
func (CaddySnake) ServeHTTP ¶
func (f CaddySnake) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
ServeHTTP implements caddyhttp.MiddlewareHandler.
func (*CaddySnake) UnmarshalCaddyfile ¶
func (f *CaddySnake) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler.
func (*CaddySnake) Validate ¶
func (m *CaddySnake) Validate() error
Validate implements caddy.Validator.
type RequestHandler ¶
type RequestHandler struct {
// contains filtered or unexported fields
}
RequestHandler stores the result of a request handled by a Wsgi app
type Wsgi ¶
type Wsgi struct {
// contains filtered or unexported fields
}
Wsgi stores a reference to a Python Wsgi application
func (*Wsgi) Cleanup ¶ added in v0.0.2
func (m *Wsgi) Cleanup()
Cleanup deallocates CGO resources used by Wsgi app
func (*Wsgi) HandleRequest ¶
HandleRequest passes request down to Python Wsgi app and writes responses and headers.