summaryrefslogtreecommitdiff
path: root/internal/container
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2022-01-15 15:52:23 +0300
committerValery Piashchynski <[email protected]>2022-01-15 15:52:23 +0300
commit65541b95a6ebc72aef818f1d2e4b0dc721f59e22 (patch)
treed9dbe5577c72810fadf1f2bc1e5fcee889fda983 /internal/container
parent5254c8eb27311e2a8a53a4c90c3829cf1238c563 (diff)
initial commit
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'internal/container')
-rw-r--r--internal/container/config.go4
-rw-r--r--internal/container/config_test.go6
-rw-r--r--internal/container/container.go2
-rw-r--r--internal/container/container_test.go4
-rw-r--r--internal/container/plugins.go102
-rw-r--r--internal/container/plugins_test.go20
6 files changed, 10 insertions, 128 deletions
diff --git a/internal/container/config.go b/internal/container/config.go
index 54e2bb5b..149d6b9b 100644
--- a/internal/container/config.go
+++ b/internal/container/config.go
@@ -4,8 +4,8 @@ import (
"fmt"
"time"
- endure "github.com/spiral/endure/pkg/container"
- "github.com/spiral/roadrunner-plugins/v2/config"
+ "github.com/roadrunner-server/config/v2"
+ endure "github.com/roadrunner-server/endure/pkg/container"
)
type Config struct {
diff --git a/internal/container/config_test.go b/internal/container/config_test.go
index 9919def4..e20b2d9e 100644
--- a/internal/container/config_test.go
+++ b/internal/container/config_test.go
@@ -4,10 +4,10 @@ import (
"testing"
"time"
- "github.com/spiral/roadrunner-binary/v2/internal/container"
+ "github.com/roadrunner-server/roadrunner/v2/internal/container"
- endure "github.com/spiral/endure/pkg/container"
- "github.com/spiral/roadrunner-plugins/v2/config"
+ "github.com/roadrunner-server/config/v2"
+ endure "github.com/roadrunner-server/endure/pkg/container"
"github.com/stretchr/testify/assert"
)
diff --git a/internal/container/container.go b/internal/container/container.go
index aa767b2e..25ba6326 100644
--- a/internal/container/container.go
+++ b/internal/container/container.go
@@ -1,7 +1,7 @@
package container
import (
- endure "github.com/spiral/endure/pkg/container"
+ endure "github.com/roadrunner-server/endure/pkg/container"
)
// NewContainer creates endure container with all required options (based on container Config). Logger is nil by
diff --git a/internal/container/container_test.go b/internal/container/container_test.go
index c6d613a0..9be043e2 100644
--- a/internal/container/container_test.go
+++ b/internal/container/container_test.go
@@ -4,9 +4,9 @@ import (
"testing"
"time"
- "github.com/spiral/roadrunner-binary/v2/internal/container"
+ "github.com/roadrunner-server/roadrunner/v2/internal/container"
- endure "github.com/spiral/endure/pkg/container"
+ endure "github.com/roadrunner-server/endure/pkg/container"
"github.com/stretchr/testify/assert"
)
diff --git a/internal/container/plugins.go b/internal/container/plugins.go
index 6c962793..8a9fb253 100644
--- a/internal/container/plugins.go
+++ b/internal/container/plugins.go
@@ -1,104 +1,6 @@
package container
-import (
- "github.com/spiral/roadrunner-plugins/v2/amqp"
- "github.com/spiral/roadrunner-plugins/v2/beanstalk"
- "github.com/spiral/roadrunner-plugins/v2/boltdb"
- "github.com/spiral/roadrunner-plugins/v2/broadcast"
- "github.com/spiral/roadrunner-plugins/v2/fileserver"
- grpcPlugin "github.com/spiral/roadrunner-plugins/v2/grpc"
- httpPlugin "github.com/spiral/roadrunner-plugins/v2/http"
- "github.com/spiral/roadrunner-plugins/v2/http/middleware/gzip"
- "github.com/spiral/roadrunner-plugins/v2/http/middleware/headers"
- newrelic "github.com/spiral/roadrunner-plugins/v2/http/middleware/new_relic"
- "github.com/spiral/roadrunner-plugins/v2/http/middleware/prometheus"
- "github.com/spiral/roadrunner-plugins/v2/http/middleware/static"
- "github.com/spiral/roadrunner-plugins/v2/http/middleware/websockets"
- "github.com/spiral/roadrunner-plugins/v2/informer"
- "github.com/spiral/roadrunner-plugins/v2/jobs"
- "github.com/spiral/roadrunner-plugins/v2/kv"
- "github.com/spiral/roadrunner-plugins/v2/logger"
- "github.com/spiral/roadrunner-plugins/v2/memcached"
- "github.com/spiral/roadrunner-plugins/v2/memory"
- "github.com/spiral/roadrunner-plugins/v2/metrics"
- "github.com/spiral/roadrunner-plugins/v2/nats"
- "github.com/spiral/roadrunner-plugins/v2/redis"
- "github.com/spiral/roadrunner-plugins/v2/reload"
- "github.com/spiral/roadrunner-plugins/v2/resetter"
- rpcPlugin "github.com/spiral/roadrunner-plugins/v2/rpc"
- "github.com/spiral/roadrunner-plugins/v2/server"
- "github.com/spiral/roadrunner-plugins/v2/service"
- "github.com/spiral/roadrunner-plugins/v2/sqs"
- "github.com/spiral/roadrunner-plugins/v2/status"
- "github.com/spiral/roadrunner-plugins/v2/tcp"
- roadrunner_temporal "github.com/temporalio/roadrunner-temporal"
-)
-
// Plugins returns active plugins for the endure container. Feel free to add or remove any plugins.
-func Plugins() []interface{} { //nolint:funlen
- return []interface{}{
- // bundled
- // informer plugin (./rr workers, ./rr workers -i)
- &informer.Plugin{},
- // resetter plugin (./rr reset)
- &resetter.Plugin{},
-
- // logger plugin
- &logger.ZapLogger{},
- // metrics plugin
- &metrics.Plugin{},
- // reload plugin
- &reload.Plugin{},
- // rpc plugin (workers, reset)
- &rpcPlugin.Plugin{},
- // server plugin (NewWorker, NewWorkerPool)
- &server.Plugin{},
- // service plugin
- &service.Plugin{},
-
- // ========= JOBS bundle
- &jobs.Plugin{},
- &amqp.Plugin{},
- &sqs.Plugin{},
- &nats.Plugin{},
- &beanstalk.Plugin{},
- // =========
-
- // http server plugin with middleware
- &httpPlugin.Plugin{},
- &newrelic.Plugin{},
- &static.Plugin{},
- &headers.Plugin{},
- &status.Plugin{},
- &gzip.Plugin{},
- &prometheus.Plugin{},
-
- &fileserver.Plugin{},
- // ===================
-
- &grpcPlugin.Plugin{},
- // kv + ws + jobs plugin
- &memory.Plugin{},
- // KV + Jobs
- &boltdb.Plugin{},
-
- // broadcast via memory or redis
- // used in conjunction with Websockets, memory and redis plugins
- &broadcast.Plugin{},
- // ======== websockets broadcast bundle
- &websockets.Plugin{},
- &redis.Plugin{},
- // =========
-
- // ============== KV
- &kv.Plugin{},
- &memcached.Plugin{},
- // ==============
-
- // raw TCP connections handling
- &tcp.Plugin{},
-
- // temporal plugins
- &roadrunner_temporal.Plugin{},
- }
+func Plugins() []interface{} {
+ return []interface{}{}
}
diff --git a/internal/container/plugins_test.go b/internal/container/plugins_test.go
deleted file mode 100644
index da639f7d..00000000
--- a/internal/container/plugins_test.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package container_test
-
-import (
- "reflect"
- "testing"
-
- "github.com/spiral/roadrunner-binary/v2/internal/container"
-)
-
-func TestPlugins(t *testing.T) {
- for _, p := range container.Plugins() {
- if p == nil {
- t.Error("plugin cannot be nil")
- }
-
- if pk := reflect.TypeOf(p).Kind(); pk != reflect.Ptr && pk != reflect.Struct {
- t.Errorf("plugin %v must be a structure or pointer to the structure", p)
- }
- }
-}