Documentation ¶
Index ¶
- Constants
- type Middleware
- type Plugin
- func (s *Plugin) AddMiddleware(name endure.Named, m Middleware)
- func (s *Plugin) Available()
- func (s *Plugin) Collects() []interface{}
- func (s *Plugin) Init(cfg config.Configurer, rrLogger logger.Logger, server server.Server) error
- func (s *Plugin) Name() string
- func (s *Plugin) Ready() status.Status
- func (s *Plugin) Reset() error
- func (s *Plugin) Serve() chan error
- func (s *Plugin) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Plugin) Status() status.Status
- func (s *Plugin) Stop() error
- func (s *Plugin) Workers() []process.State
Constants ¶
View Source
const ( // PluginName declares plugin name. PluginName = "http" // RrMode RR_HTTP env variable key (internal) if the HTTP presents RrMode = "RR_MODE" HTTPSScheme = "https" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Middleware ¶
Middleware interface
type Plugin ¶
Plugin manages pool, http servers. The main http plugin structure
func (*Plugin) AddMiddleware ¶
func (s *Plugin) AddMiddleware(name endure.Named, m Middleware)
AddMiddleware is base requirement for the middleware (name and Middleware)
func (*Plugin) Available ¶ added in v2.2.0
func (s *Plugin) Available()
Available interface implementation
func (*Plugin) Collects ¶
func (s *Plugin) Collects() []interface{}
Collects collecting http middlewares
func (*Plugin) Init ¶
Init must return configure svc and return true if svc hasStatus enabled. Must return error in case of misconfiguration. Services must not be used without proper configuration pushed first.
func (*Plugin) Reset ¶
Reset destroys the old pool and replaces it with new one, waiting for old pool to die
func (*Plugin) ServeHTTP ¶
func (s *Plugin) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP handles connection using set of middleware and pool PSR-7 server.
Click to show internal directories.
Click to hide internal directories.