diff options
-rw-r--r-- | cmd/main.go | 7 | ||||
-rw-r--r-- | plugins/http/plugin.go | 4 | ||||
-rw-r--r-- | plugins/rpc/config.go | 4 | ||||
-rw-r--r-- | plugins/server/plugin.go | 8 | ||||
-rwxr-xr-x | utils/doc.go (renamed from util/doc.go) | 2 | ||||
-rwxr-xr-x | utils/isolate.go (renamed from util/isolate.go) | 2 | ||||
-rwxr-xr-x | utils/isolate_win.go (renamed from util/isolate_win.go) | 2 | ||||
-rwxr-xr-x | utils/network.go (renamed from util/network.go) | 2 | ||||
-rwxr-xr-x | utils/network_test.go (renamed from util/network_test.go) | 2 | ||||
-rwxr-xr-x | utils/network_windows.go (renamed from util/network_windows.go) | 2 | ||||
-rwxr-xr-x | utils/network_windows_test.go (renamed from util/network_windows_test.go) | 2 |
11 files changed, 18 insertions, 19 deletions
diff --git a/cmd/main.go b/cmd/main.go index 4e7fc099..f5d4e0ad 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -4,17 +4,16 @@ import ( "log" "github.com/spiral/endure" + "github.com/spiral/roadrunner/v2/cmd/cli" "github.com/spiral/roadrunner/v2/plugins/http" "github.com/spiral/roadrunner/v2/plugins/informer" - "github.com/spiral/roadrunner/v2/plugins/server" - - "github.com/spiral/roadrunner/v2/cmd/cli" "github.com/spiral/roadrunner/v2/plugins/logger" "github.com/spiral/roadrunner/v2/plugins/metrics" "github.com/spiral/roadrunner/v2/plugins/redis" "github.com/spiral/roadrunner/v2/plugins/reload" "github.com/spiral/roadrunner/v2/plugins/resetter" "github.com/spiral/roadrunner/v2/plugins/rpc" + "github.com/spiral/roadrunner/v2/plugins/server" ) func main() { @@ -35,7 +34,7 @@ func main() { &http.Plugin{}, // reload plugin &reload.Plugin{}, - // informer plugin (./rr workers) + // informer plugin (./rr workers, ./rr workers -i) &informer.Plugin{}, // resetter plugin (./rr reset) &resetter.Plugin{}, diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index f3708ced..2651f305 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -23,7 +23,7 @@ import ( "github.com/spiral/roadrunner/v2/plugins/http/attributes" "github.com/spiral/roadrunner/v2/plugins/logger" "github.com/spiral/roadrunner/v2/plugins/server" - "github.com/spiral/roadrunner/v2/util" + "github.com/spiral/roadrunner/v2/utils" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" "golang.org/x/sys/cpu" @@ -479,7 +479,7 @@ func (s *Plugin) initHTTP2() error { // serveFCGI starts FastCGI server. func (s *Plugin) serveFCGI() error { - l, err := util.CreateListener(s.cfg.FCGI.Address) + l, err := utils.CreateListener(s.cfg.FCGI.Address) if err != nil { return err } diff --git a/plugins/rpc/config.go b/plugins/rpc/config.go index 719fd5e3..d7531435 100644 --- a/plugins/rpc/config.go +++ b/plugins/rpc/config.go @@ -5,7 +5,7 @@ import ( "net" "strings" - "github.com/spiral/roadrunner/v2/util" + "github.com/spiral/roadrunner/v2/utils" ) // Config defines RPC service config. @@ -35,7 +35,7 @@ func (c *Config) Valid() error { // Listener creates new rpc socket Listener. func (c *Config) Listener() (net.Listener, error) { - return util.CreateListener(c.Listen) + return utils.CreateListener(c.Listen) } // Dialer creates rpc socket Dialer. diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 5b023bc6..5d1f26d3 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -18,7 +18,7 @@ import ( "github.com/spiral/roadrunner/v2/pkg/pipe" poolImpl "github.com/spiral/roadrunner/v2/pkg/pool" "github.com/spiral/roadrunner/v2/pkg/socket" - "github.com/spiral/roadrunner/v2/util" + "github.com/spiral/roadrunner/v2/utils" ) const PluginName = "server" @@ -86,12 +86,12 @@ func (server *Plugin) CmdFactory(env Env) (func() *exec.Cmd, error) { } return func() *exec.Cmd { cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...) //nolint:gosec - util.IsolateProcess(cmd) + utils.IsolateProcess(cmd) // if user is not empty, and OS is linux or macos // execute php worker from that particular user if server.cfg.User != "" { - err := util.ExecuteFromUser(cmd, server.cfg.User) + err := utils.ExecuteFromUser(cmd, server.cfg.User) if err != nil { return nil } @@ -154,7 +154,7 @@ func (server *Plugin) initFactory() (worker.Factory, error) { return nil, errors.E(op, errors.Network, errors.Str("invalid DSN (tcp://:6001, unix://file.sock)")) } - lsn, err := util.CreateListener(server.cfg.Relay) + lsn, err := utils.CreateListener(server.cfg.Relay) if err != nil { return nil, errors.E(op, errors.Network, err) } diff --git a/util/doc.go b/utils/doc.go index a3798715..2c1c0d9c 100755 --- a/util/doc.go +++ b/utils/doc.go @@ -1,4 +1,4 @@ -package util +package utils /* This package should not contain roadrunner dependencies, only system or third-party diff --git a/util/isolate.go b/utils/isolate.go index 0ea1dff3..b797a999 100755 --- a/util/isolate.go +++ b/utils/isolate.go @@ -1,6 +1,6 @@ // +build !windows -package util +package utils import ( "fmt" diff --git a/util/isolate_win.go b/utils/isolate_win.go index 6756d59f..b2b213a8 100755 --- a/util/isolate_win.go +++ b/utils/isolate_win.go @@ -1,6 +1,6 @@ // +build windows -package util +package utils import ( "os/exec" diff --git a/util/network.go b/utils/network.go index c2475f4a..fcfc4ace 100755 --- a/util/network.go +++ b/utils/network.go @@ -1,6 +1,6 @@ // +build linux darwin freebsd -package util +package utils import ( "errors" diff --git a/util/network_test.go b/utils/network_test.go index 1dc16e94..cfed98f9 100755 --- a/util/network_test.go +++ b/utils/network_test.go @@ -1,6 +1,6 @@ // +build linux darwin freebsd -package util +package utils import ( "testing" diff --git a/util/network_windows.go b/utils/network_windows.go index 843d5779..ebe343a3 100755 --- a/util/network_windows.go +++ b/utils/network_windows.go @@ -1,6 +1,6 @@ // +build windows -package util +package utils import ( "errors" diff --git a/util/network_windows_test.go b/utils/network_windows_test.go index b6648ed0..277dc970 100755 --- a/util/network_windows_test.go +++ b/utils/network_windows_test.go @@ -1,6 +1,6 @@ // +build windows -package util +package utils import ( "github.com/stretchr/testify/assert" |