Documentation ¶
Index ¶
- func Codec() grpc.Codec
- func CodecWithParent(fallback grpc.Codec) grpc.Codec
- func NewLogger() (*zap.Logger, error)
- func SetAddress(addr string) func(*Server) error
- func SetAuxAddress(addr string) func(*Server) error
- func SetEntryFile(f string) func(*Server) error
- func SetFastCGIEndpoint(endpoint string) func(*Server) error
- func SetLogger(l *zap.Logger) func(*Server) error
- type OptionsFunc
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Codec ¶
Codec returns a proxying grpc.Codec with the default protobuf codec as parent.
See CodecWithParent.
func CodecWithParent ¶
CodecWithParent returns a proxying grpc.Codec with a user provided codec as parent.
This codec is *crucial* to the functioning of the proxy. It allows the proxy server to be oblivious to the schema of the forwarded messages. It basically treats a gRPC message frame as raw bytes. However, if the server handler, or the client caller are not proxy-internal functions it will fall back to trying to decode the message using a fallback codec.
func SetAddress ¶
SetAddress creates a function that will set the listening address. Generally, used when create a new Server.
func SetAuxAddress ¶ added in v0.3.0
SetAuxAddress creates a function that will set the aux address. Generally, used when create a new Server.
func SetEntryFile ¶
SetEntryFile creates a function that will set the entryfile for php. Generally, used when create a new Server.
func SetFastCGIEndpoint ¶
SetFastCGIEndpoint creates a function that will set the fastCGI endpoint to proxy. Endpoint should be url. Default is tcp://127.0.0.1:9090 Generally, used when create a new Server.
Types ¶
type OptionsFunc ¶
OptionsFunc is a function passed to New to set options.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an http/2 server that proxies to fastcgi
func NewServer ¶
func NewServer(options ...OptionsFunc) (*Server, error)
NewServer creates a new Server.
func (*Server) AddAuxPath ¶ added in v0.3.0
AddAuxPath adds a path to be served on the auxiliary port. if filename is empty, then the current working directory plus path is used