Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CgiResponse ¶
type CgiResponse struct {
// contains filtered or unexported fields
}
func (*CgiResponse) Backend ¶
func (resp *CgiResponse) Backend() string
func (*CgiResponse) Close ¶
func (resp *CgiResponse) Close()
func (*CgiResponse) Init ¶
func (resp *CgiResponse) Init(req *Request) (err error)
type Config ¶
type Config struct { ListenAddr string `json:"listen"` MatchOptions MatchOptionsConfig `json:"match_options"` CgiTimeout int `json:"cgi_timeout"` Routes []Route `json:"routes"` Backends []Backend `json:"backends"` Certs []Cert `json:"certs"` ContentType ContentTypeConfig `json:"content_type"` }
func LoadConfig ¶
func (*Config) GetBackendByName ¶
type ContentTypeConfig ¶
type ErrorResponse ¶
func (*ErrorResponse) Backend ¶
func (resp *ErrorResponse) Backend() string
func (*ErrorResponse) Close ¶
func (resp *ErrorResponse) Close()
func (*ErrorResponse) Init ¶
func (resp *ErrorResponse) Init(req *Request) (err error)
type MatchOptionsConfig ¶
type RedirectResponse ¶
type RedirectResponse struct { StatusCode int Target string // contains filtered or unexported fields }
func (*RedirectResponse) Backend ¶
func (resp *RedirectResponse) Backend() string
func (*RedirectResponse) Close ¶
func (resp *RedirectResponse) Close()
func (*RedirectResponse) Init ¶
func (resp *RedirectResponse) Init(req *Request) (err error)
type Response ¶
type Response interface { // Called before response body is read, in order to perform any needed // initialization. Init(req *Request) (err error) // Read a part of the response body. Implementes the io.Reader interface. Read(p []byte) (n int, err error) // Release any resources related to this response Close() // Returns the backend name for this response Backend() string }
func NewPermRedirectResp ¶
func NewTempRedirectResp ¶
type StaticResponse ¶
type StaticResponse struct {
// contains filtered or unexported fields
}
func (*StaticResponse) Backend ¶
func (resp *StaticResponse) Backend() string
func (*StaticResponse) Close ¶
func (resp *StaticResponse) Close()
func (*StaticResponse) Init ¶
func (resp *StaticResponse) Init(req *Request) (err error)
Click to show internal directories.
Click to hide internal directories.