fcgi

package
v0.0.0-...-a92711d Latest Latest
Warning

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

Go to latest
Published: May 28, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Listening socket file number
	FCGI_LISTENSOCK_FILENO = 0

	// Number of bytes in a FCGI_Header
	FCGI_HEADER_LEN = 8

	// Value for version component of FCGI_Header
	FCGI_VERSION_1 = 1

	// Values for type component of FCGI_Header
	FCGI_BEGIN_REQUEST     = byte(1)
	FCGI_ABORT_REQUEST     = byte(2)
	FCGI_END_REQUEST       = byte(3)
	FCGI_PARAMS            = byte(4)
	FCGI_STDIN             = byte(5)
	FCGI_STDOUT            = byte(6)
	FCGI_STDERR            = byte(7)
	FCGI_DATA              = byte(8)
	FCGI_GET_VALUES        = byte(9)
	FCGI_GET_VALUES_RESULT = byte(10)
	FCGI_UNKNOWN_TYPE      = byte(11)
	FCGI_MAXTYPE           = FCGI_UNKNOWN_TYPE

	// Value for requestId component of FCGI_Header
	FCGI_NULL_REQUEST_ID = 0

	// Mask for flags component of FCGI_BeginRequestBody
	FCGI_KEEP_CONN = byte(1)

	// Values for role component of FCGI_BeginRequestBody
	FCGI_RESPONDER  = byte(1)
	FCGI_AUTHORIZER = byte(2)
	FCGI_FILTER     = byte(3)

	// Values for protocolStatus component of FCGI_EndRequestBody
	FCGI_REQUEST_COMPLETE = byte(0)
	FCGI_CANT_MPX_CONN    = byte(1)
	FCGI_OVERLOADED       = byte(2)
	FCGI_UNKNOWN_ROLE     = byte(3)

	// Variable names for FCGI_GET_VALUES / FCGI_GET_VALUES_RESULT records
	FCGI_MAX_CONNS  = "FCGI_MAX_CONNS"
	FCGI_MAX_REQS   = "FCGI_MAX_REQS"
	FCGI_MPXS_CONNS = "FCGI_MPXS_CONNS"
)

Variables

View Source
var ErrClientDisconnect = errors.New("lost connection to server")
View Source
var PAD = [255]byte{}

Functions

This section is empty.

Types

type BeginRequestBody

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

type Client

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

func NewClient

func NewClient(network string, address string) *Client

func (*Client) Call

func (this *Client) Call(req *Request) (resp *http.Response, stderr []byte, err error)

func (*Client) Close

func (this *Client) Close()

func (*Client) Connect

func (this *Client) Connect() error

func (*Client) KeepAlive

func (this *Client) KeepAlive()

func (*Client) Mock

func (this *Client) Mock()

type EndRequestBody

type EndRequestBody struct {
	// contains filtered or unexported fields
}
type Header struct {
	Version       byte
	Type          byte
	RequestId     uint16
	ContentLength uint16
	PaddingLength byte
	Reserved      byte
}

type NameValuePair

type NameValuePair struct {
	NameLength  uint16
	ValueLength uint16
}

type Pool

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

func SharedPool

func SharedPool(network string, address string, size uint) *Pool

func (*Pool) Client

func (this *Pool) Client() (*Client, error)

type Request

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

Request Referer:

func NewRequest

func NewRequest() *Request

func (*Request) CallOn

func (this *Request) CallOn(conn net.Conn) (resp *http.Response, stderr []byte, err error)

func (*Request) KeepAlive

func (this *Request) KeepAlive()

func (*Request) SetBody

func (this *Request) SetBody(body io.Reader, length uint32)

func (*Request) SetParam

func (this *Request) SetParam(name, value string)

func (*Request) SetParams

func (this *Request) SetParams(params map[string]string)

func (*Request) SetTimeout

func (this *Request) SetTimeout(timeout time.Duration)

type UnknownTypeBody

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

Jump to

Keyboard shortcuts

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