summaryrefslogtreecommitdiff
path: root/plugins/factory
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/factory')
-rw-r--r--plugins/factory/app.go18
-rw-r--r--plugins/factory/tests/factory_test.go3
2 files changed, 1 insertions, 20 deletions
diff --git a/plugins/factory/app.go b/plugins/factory/app.go
index 753ca2a9..e4002963 100644
--- a/plugins/factory/app.go
+++ b/plugins/factory/app.go
@@ -33,17 +33,12 @@ type AppConfig struct {
type App struct {
cfg AppConfig
configProvider config.Provider
- factory roadrunner.Factory
}
func (app *App) Init(provider config.Provider) error {
app.cfg = AppConfig{}
app.configProvider = provider
- return nil
-}
-
-func (app *App) Configure() error {
err := app.configProvider.UnmarshalKey("app", &app.cfg)
if err != nil {
return err
@@ -56,10 +51,6 @@ func (app *App) Configure() error {
return nil
}
-func (app *App) Close() error {
- return nil
-}
-
func (app *App) NewCmd(env Env) (func() *exec.Cmd, error) {
var cmdArgs []string
// create command according to the config
@@ -111,15 +102,6 @@ func (app *App) NewFactory(env Env) (roadrunner.Factory, error) {
}
}
-func (app *App) Serve() chan error {
- errCh := make(chan error)
- return errCh
-}
-
-func (app *App) Stop() error {
- return nil
-}
-
func (app *App) setEnv(e Env) []string {
env := append(os.Environ(), fmt.Sprintf("RR_RELAY=%s", app.cfg.Relay))
for k, v := range e {
diff --git a/plugins/factory/tests/factory_test.go b/plugins/factory/tests/factory_test.go
index 72e28f84..5347083a 100644
--- a/plugins/factory/tests/factory_test.go
+++ b/plugins/factory/tests/factory_test.go
@@ -57,7 +57,7 @@ func TestFactory(t *testing.T) {
}
// stop by CTRL+C
- c := make(chan os.Signal)
+ c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
tt := time.NewTicker(time.Second * 2)
@@ -80,5 +80,4 @@ func TestFactory(t *testing.T) {
return
}
}
-
}