Documentation ¶
Index ¶
- Constants
- type Middleware
- type Plugin
- func (p *Plugin) AddMiddleware(name endure.Named, m Middleware)
- func (p *Plugin) Available()
- func (p *Plugin) Collect(ch chan<- prometheus.Metric)
- func (p *Plugin) Collects() []interface{}
- func (p *Plugin) Describe(d chan<- *prometheus.Desc)
- func (p *Plugin) Init(cfg config.Configurer, rrLogger logger.Logger, server server.Server) error
- func (p *Plugin) MetricsCollector() []prometheus.Collector
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() status.Status
- func (p *Plugin) Reset() error
- func (p *Plugin) Serve() chan error
- func (p *Plugin) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (p *Plugin) Status() status.Status
- func (p *Plugin) Stop() error
- func (p *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 (p *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 (p *Plugin) Available()
Available interface implementation
func (*Plugin) Collect ¶ added in v2.3.0
func (p *Plugin) Collect(ch chan<- prometheus.Metric)
func (*Plugin) Collects ¶
func (p *Plugin) Collects() []interface{}
Collects collecting http middlewares
func (*Plugin) Describe ¶ added in v2.3.0
func (p *Plugin) Describe(d chan<- *prometheus.Desc)
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) MetricsCollector ¶ added in v2.3.0
func (p *Plugin) MetricsCollector() []prometheus.Collector
func (*Plugin) Reset ¶
Reset destroys the old pool and replaces it with new one, waiting for old pool to die
func (*Plugin) ServeHTTP ¶
func (p *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.