Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { // Print logging message Print(context.Context, ...any) // Print formatted logging message Printf(context.Context, string, ...any) }
Logger interface
type Middleware ¶
type Middleware interface { Task // Wrap a handler function Wrap(context.Context, http.HandlerFunc) http.HandlerFunc }
Middleware represents an interceptor for HTTP requests
type Plugin ¶
type Plugin interface { // Return the unique name for the plugin Name() string // Return a description of the plugin Description() string // Create a task from a plugin New() (Task, error) }
Plugin represents a plugin that can create a task
type Router ¶
type Router interface { Task // Add a handler to the router, with the given path // and methods. The context is used to pass additional // parameters to the handler. If no methods are provided, then // all methods are allowed. AddHandler(context.Context, string, http.Handler, ...string) // Add a handler function to the router, with the given path // and methods. The context is used to pass additional // parameters to the handler. If no methods are provided, then // all methods are allowed. AddHandlerFunc(context.Context, string, http.HandlerFunc, ...string) // Add a handler to the router, with the given regular expression // path and methods. The context is used to pass additional // parameters to the handler. If no methods are provided, then // all methods are allowed. AddHandlerRe(context.Context, *regexp.Regexp, http.Handler, ...string) // Add a handler function to the router, with the given regular expression // path and methods. The context is used to pass additional // parameters to the handler. If no methods are provided, then // all methods are allowed. AddHandlerFuncRe(context.Context, *regexp.Regexp, http.HandlerFunc, ...string) }
Router represents a router to which you can add requests
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
pkg
|
|
handler/nginx
The `nginx` task spawns an nginx server, and can test and reload the nginx configuration programmatically or through the API gateway.
|
The `nginx` task spawns an nginx server, and can test and reload the nginx configuration programmatically or through the API gateway. |
handler/nginx/client
Implements an API client for the nginx API (https://github.com/mutablelogic/go-server/pkg/handler/nginx)
|
Implements an API client for the nginx API (https://github.com/mutablelogic/go-server/pkg/handler/nginx) |
handler/nginx/folders
Manages the lifecycle of configuration folders for nginx
|
Manages the lifecycle of configuration folders for nginx |
httpserver
The `httpserver` task implements a server which can serve requests over HTTP, HTTPS and FCGI
|
The `httpserver` task implements a server which can serve requests over HTTP, HTTPS and FCGI |
httpserver/fcgi
Package fcgi implements the FastCGI protocol.
|
Package fcgi implements the FastCGI protocol. |
Click to show internal directories.
Click to hide internal directories.