@@ -11,7 +11,7 @@ import (
1111 rrcontext "github.com/roadrunner-server/context"
1212 "github.com/roadrunner-server/endure/v2/dep"
1313 "github.com/roadrunner-server/errors"
14- "github.com/roadrunner-server/http/v5/common "
14+ "github.com/roadrunner-server/http/v5/api "
1515 "github.com/roadrunner-server/http/v5/config"
1616 "github.com/roadrunner-server/http/v5/handler"
1717 "github.com/roadrunner-server/http/v5/servers"
@@ -49,7 +49,7 @@ type Plugin struct {
4949 prop propagation.TextMapPropagator
5050
5151 // plugins
52- server common .Server
52+ server api .Server
5353 log * zap.Logger
5454 // stdlog passed to the http/https/fcgi servers to log their internal messages
5555 stdLog * stdlog.Logger
@@ -59,9 +59,9 @@ type Plugin struct {
5959 cfg * config.Config
6060
6161 // middlewares to chain
62- mdwr map [string ]common .Middleware
62+ mdwr map [string ]api .Middleware
6363 // Pool which attached to all servers
64- pool common .Pool
64+ pool api .Pool
6565 // servers RR handler
6666 handler * handler.Handler
6767 // metrics
@@ -72,7 +72,7 @@ type Plugin struct {
7272
7373// Init must return configure svc and return true if svc hasStatus enabled. Must return error in case of
7474// misconfiguration. Services must not be used without proper configuration pushed first.
75- func (p * Plugin ) Init (cfg common .Configurer , log common .Logger , srv common .Server ) error {
75+ func (p * Plugin ) Init (cfg api .Configurer , log api .Logger , srv api .Server ) error {
7676 const op = errors .Op ("http_plugin_init" )
7777 if ! cfg .Has (PluginName ) {
7878 return errors .E (op , errors .Disabled )
@@ -100,7 +100,7 @@ func (p *Plugin) Init(cfg common.Configurer, log common.Logger, srv common.Serve
100100
101101 // use time and date in UTC format
102102 p .stdLog = stdlog .New (NewStdAdapter (p .log ), "http_plugin: " , stdlog .Ldate | stdlog .Ltime | stdlog .LUTC )
103- p .mdwr = make (map [string ]common .Middleware )
103+ p .mdwr = make (map [string ]api .Middleware )
104104
105105 if ! p .cfg .EnableHTTP () && ! p .cfg .EnableTLS () && ! p .cfg .EnableFCGI () {
106106 return errors .E (op , errors .Disabled )
@@ -276,11 +276,11 @@ func (p *Plugin) Reset() error {
276276func (p * Plugin ) Collects () []* dep.In {
277277 return []* dep.In {
278278 dep .Fits (func (pp any ) {
279- mdw := pp .(common .Middleware )
279+ mdw := pp .(api .Middleware )
280280 // just to be safe
281281 p .mu .Lock ()
282282 p .mdwr [mdw .Name ()] = mdw
283283 p .mu .Unlock ()
284- }, (* common .Middleware )(nil )),
284+ }, (* api .Middleware )(nil )),
285285 }
286286}
0 commit comments