Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface {
common.Service
common.Initializable
common.Daemon
Get(name string) (Server, error)
List() []Server
RegisterRouters(routers ...api.Router) error
RegisterMiddlewares(middlewares ...api.Middleware) error
Add(name string, opts ...ServerOption) error
}
Manager manages multiple server instances.
type ServerOption ¶
type ServerOption func(*server)
ServerOption configures a server (echo server instance)
func WithEndpoint ¶
func WithEndpoint(host string, port uint, prefix string) ServerOption
func WithMiddlewares ¶ added in v0.6.0
func WithMiddlewares(mws ...api.Middleware) ServerOption
WithMiddlewares installs middlewares on the server itself, ahead of the built-in chain and so ahead of any route match - where a concern that must answer requests no route matches, such as CORS preflight, has to sit. They run on every request to the server, are built with a nil config, and survive the echo rebuild a restart performs. RequestInfo does not exist yet at this position; a middleware that reads it belongs in router.yaml instead.
func WithTLS ¶
func WithTLS(cert certutil.CertBundle, auth bool) ServerOption
Click to show internal directories.
Click to hide internal directories.