Documentation ¶
Index ¶
- Constants
- type Informer
- type Plugin
- func (p *Plugin) AddWorker() error
- func (p *Plugin) Collects() []*dep.In
- func (p *Plugin) Init(cfg common.Configurer, rrLogger common.Logger, srv common.Server) error
- func (p *Plugin) MetricsCollector() []prometheus.Collector
- func (p *Plugin) Name() string
- func (p *Plugin) Ready() (*status.Status, error)
- func (p *Plugin) RemoveWorker(ctx context.Context) error
- 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, error)
- func (p *Plugin) Stop(ctx context.Context) error
- func (p *Plugin) Workers() []*process.State
- type StdLogAdapter
Constants ¶
View Source
const ( // PluginName declares plugin name. PluginName = "http" MB uint64 = 1024 * 1024 // RrMode RR_HTTP env variable key (internal) if the HTTP presents RrMode = "RR_MODE" RrModeHTTP = "http" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct {
// contains filtered or unexported fields
}
Plugin manages pool, http servers. The main http plugin structure
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 ¶
func (p *Plugin) MetricsCollector() []prometheus.Collector
func (*Plugin) RemoveWorker ¶ added in v4.4.1
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.
type StdLogAdapter ¶
type StdLogAdapter struct {
// contains filtered or unexported fields
}
StdLogAdapter can be passed to the http.Server or any place which required standard logger to redirect output to the logger plugin
func NewStdAdapter ¶
func NewStdAdapter(log *zap.Logger) *StdLogAdapter
NewStdAdapter constructs StdLogAdapter
Source Files ¶
Click to show internal directories.
Click to hide internal directories.