fastcgi

package
v0.0.0-...-aa68dce Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2020 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FCGI_BEGIN_REQUEST uint8 = iota + 1
	FCGI_ABORT_REQUEST
	FCGI_END_REQUEST
	FCGI_PARAMS
	FCGI_STDIN
	FCGI_STDOUT
	FCGI_STDERR
	FCGI_DATA
	FCGI_GET_VALUES
	FCGI_GET_VALUES_RESULT
	FCGI_UNKNOWN_TYPE
	FCGI_MAXTYPE = FCGI_UNKNOWN_TYPE
)
View Source
const (
	FCGI_RESPONDER uint8 = iota + 1
	FCGI_AUTHORIZER
	FCGI_FILTER
)
View Source
const (
	FCGI_REQUEST_COMPLETE uint8 = iota
	FCGI_CANT_MPX_CONN
	FCGI_OVERLOADED
	FCGI_UNKNOWN_ROLE
)
View Source
const (
	FCGI_MAX_CONNS  string = "MAX_CONNS"
	FCGI_MAX_REQS   string = "MAX_REQS"
	FCGI_MPXS_CONNS string = "MPXS_CONNS"
)
View Source
const FCGI_HEADER_LEN uint8 = 8
View Source
const FCGI_KEEP_CONN uint8 = 1
View Source
const FCGI_LISTENSOCK_FILENO uint8 = 0
View Source
const FCGI_NULL_REQUEST_ID uint8 = 0
View Source
const VERSION_1 uint8 = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type FCGIClient

type FCGIClient struct {
	// contains filtered or unexported fields
}

func Dial

func Dial(network, address string) (fcgi *FCGIClient, err error)

Connects to the fcgi responder at the specified network address. See func net.Dial for a description of the network and address parameters.

func DialTimeout

func DialTimeout(network, address string, timeout time.Duration, keepAlive bool) (fcgi *FCGIClient, err error)

Connects to the fcgi responder at the specified network address with timeout See func net.DialTimeout for a description of the network, address and timeout parameters.

func (*FCGIClient) Close

func (this *FCGIClient) Close()

Close fcgi connnection

func (*FCGIClient) Do

func (this *FCGIClient) Do(p map[string]string, req io.Reader) (r io.Reader, err error)

Do made the request and returns a io.Reader that translates the data read from fcgi responder out of fcgi packet before returning it.

func (*FCGIClient) Get

func (this *FCGIClient) Get(p map[string]string) (resp *http.Response, err error)

Get issues a GET request to the fcgi responder.

func (*FCGIClient) Post

func (this *FCGIClient) Post(p map[string]string, bodyType string, body io.Reader, l int) (resp *http.Response, err error)

Get issues a Post request to the fcgi responder. with request body in the format that bodyType specified

func (*FCGIClient) PostFile

func (this *FCGIClient) PostFile(p map[string]string, data url.Values, file map[string]string) (resp *http.Response, err error)

PostFile issues a POST to the fcgi responder in multipart(RFC 2046) standard, with form as a string key to a list values (url.Values), and/or with file as a string key to a list file path.

func (*FCGIClient) PostForm

func (this *FCGIClient) PostForm(p map[string]string, data url.Values) (resp *http.Response, err error)

PostForm issues a POST to the fcgi responder, with form as a string key to a list values (url.Values)

func (*FCGIClient) Request

func (this *FCGIClient) Request(p map[string]string, req io.Reader) (resp *http.Response, err error)

Request returns a HTTP Response with Header and Body from fcgi responder

func (*FCGIClient) SetReadDeadline

func (this *FCGIClient) SetReadDeadline(d time.Duration) error

func (*FCGIClient) SetWriteDeadline

func (this *FCGIClient) SetWriteDeadline(d time.Duration) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL