diff options
author | Valery Piashchynski <[email protected]> | 2021-01-07 15:53:11 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-07 15:53:11 +0300 |
commit | ac71c41bec81fcb457e2ad18f4cbaa3f4b99d6c4 (patch) | |
tree | 5d42ca5aecf65609ebaabc517c1368d43dbce179 /plugins/server | |
parent | 984953a9db1d94817bda2e3d9266583151b1b437 (diff) | |
parent | 74405558a4a5bafefd081553f70d85943e9a3a37 (diff) |
Merge pull request #468 from spiral/plugin/kv
Plugin/kv
Diffstat (limited to 'plugins/server')
-rw-r--r-- | plugins/server/config.go | 1 | ||||
-rw-r--r-- | plugins/server/interface.go | 1 | ||||
-rw-r--r-- | plugins/server/plugin.go | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/plugins/server/config.go b/plugins/server/config.go index 4bef3c5f..2bf30e70 100644 --- a/plugins/server/config.go +++ b/plugins/server/config.go @@ -28,6 +28,7 @@ type Config struct { RelayTimeout time.Duration } +// InitDefaults for the server config func (cfg *Config) InitDefaults() { if cfg.Relay == "" { cfg.Relay = "pipes" diff --git a/plugins/server/interface.go b/plugins/server/interface.go index 98345694..a2d8b92b 100644 --- a/plugins/server/interface.go +++ b/plugins/server/interface.go @@ -10,6 +10,7 @@ import ( poolImpl "github.com/spiral/roadrunner/v2/pkg/pool" ) +// Env variables type alias type Env map[string]string // Server creates workers for the application. diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go index 5d1f26d3..8a843723 100644 --- a/plugins/server/plugin.go +++ b/plugins/server/plugin.go @@ -21,6 +21,7 @@ import ( "github.com/spiral/roadrunner/v2/utils" ) +// PluginName for the server const PluginName = "server" // Plugin manages worker @@ -53,11 +54,13 @@ func (server *Plugin) Name() string { return PluginName } +// Serve (Start) server plugin (just a mock here to satisfy interface) func (server *Plugin) Serve() chan error { errCh := make(chan error, 1) return errCh } +// Stop used to close chosen in config factory func (server *Plugin) Stop() error { if server.factory == nil { return nil |