bfe_fcgi

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// FCGIBeginRequest is the begin request flag.
	FCGIBeginRequest uint8 = iota + 1

	// FCGIAbortRequest is the abort request flag.
	FCGIAbortRequest

	// FCGIEndRequest is the end request flag.
	FCGIEndRequest

	// FCGIParams is the parameters flag.
	FCGIParams

	// FCGIStdin is the standard input flag.
	FCGIStdin

	// FCGIStdout is the standard output flag.
	FCGIStdout

	// FCGIStderr is the standard error flag.
	FCGIStderr

	// FCGIData is the data flag.
	FCGIData

	// FCGIGetValues is the get values flag.
	FCGIGetValues

	// FCGIGetValuesResult is the get values result flag.
	FCGIGetValuesResult

	// FCGIUnknownType is the unknown type flag.
	FCGIUnknownType

	// FCGIMaxType is the maximum type flag.
	FCGIMaxType = FCGIUnknownType
)
View Source
const (
	// FCGIResponder is the responder flag.
	FCGIResponder uint8 = iota + 1

	// FCGIAuthorizer is the authorizer flag.
	FCGIAuthorizer

	// FCGIFilter is the filter flag.
	FCGIFilter
)
View Source
const (
	// FCGIRequestComplete is the completed request flag.
	FCGIRequestComplete uint8 = iota

	// FCGICantMpxConn is the multiplexed connections flag.
	FCGICantMpxConn

	// FCGIOverLoaded is the overloaded flag.
	FCGIOverLoaded

	// FCGIUnknownRole is the unknown role flag.
	FCGIUnknownRole
)
View Source
const (
	// FCGIMaxConns is the maximum connections flag.
	FCGIMaxConns string = "MAX_CONNS"

	// FCGIMaxReqs is the maximum requests flag.
	FCGIMaxReqs string = "MAX_REQS"

	// FCGIMpxsConns is the multiplex connections flag.
	FCGIMpxsConns string = "MPXS_CONNS"
)
View Source
const FCGIHeaderLen uint8 = 8

FCGIHeaderLen describes header length.

View Source
const FCGIKeepConn uint8 = 1

FCGIKeepConn describes keep connection mode.

View Source
const FCGIListenSockFileNo uint8 = 0

FCGIListenSockFileNo describes listen socket file number.

View Source
const FCGINullRequestID uint8 = 0

FCGINullRequestID describes the null request ID.

View Source
const Version1 uint8 = 1

Version1 describes the version.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectError

type ConnectError struct {
	Addr string
	Err  error
}

func (ConnectError) Error

func (e ConnectError) Error() string

type FCGIClient

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

FCGIClient implements a FastCGI client, which is a standard for interfacing external applications with Web servers.

func Dial

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

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

func (*FCGIClient) Close

func (client *FCGIClient) Close()

Close closes fcgi connection

func (*FCGIClient) Do

func (client *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 (client *FCGIClient) Get(p map[string]string) (resp *http.Response, err error)

Get issues a GET request to the fcgi responder.

func (*FCGIClient) Head

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

Head issues a HEAD request to the fcgi responder.

func (*FCGIClient) Options

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

Options issues an OPTIONS request to the fcgi responder.

func (*FCGIClient) Post

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

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

func (*FCGIClient) PostFile

func (client *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 (client *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 (client *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) SetReadTimeout

func (c *FCGIClient) SetReadTimeout(t time.Duration) error

SetReadTimeout sets the read timeout for future calls that read from the fcgi responder. A zero value for t means no timeout will be set.

func (*FCGIClient) SetWriteTimeout

func (c *FCGIClient) SetWriteTimeout(t time.Duration) error

SetWriteTimeout sets the write timeout for future calls that send data to the fcgi responder. A zero value for t means no timeout will be set.

type ReadRespHeaderError

type ReadRespHeaderError struct {
	Err error
}

func (ReadRespHeaderError) Error

func (e ReadRespHeaderError) Error() string

type Transport

type Transport struct {
	// Root is the fastcgi root directory. Defaults to the root
	// directory of the parent virtual host.
	Root string

	// EnvVars is the extra environment variables.
	EnvVars map[string]string
}

Transport facilitates FastCGI communication.

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

type WriteRequestError

type WriteRequestError struct {
	Err error
}

func (WriteRequestError) CheckTargetError

func (e WriteRequestError) CheckTargetError(addr net.Addr) bool

func (WriteRequestError) Error

func (e WriteRequestError) Error() string

Jump to

Keyboard shortcuts

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