diff options
Diffstat (limited to 'interfaces')
-rwxr-xr-x | interfaces/config/interface.go | 22 | ||||
-rw-r--r-- | interfaces/informer/interface.go | 10 | ||||
-rw-r--r-- | interfaces/log/interface.go | 16 | ||||
-rw-r--r-- | interfaces/metrics/interface.go | 9 | ||||
-rw-r--r-- | interfaces/redis/interface.go | 9 | ||||
-rw-r--r-- | interfaces/resetter/interface.go | 17 | ||||
-rw-r--r-- | interfaces/rpc/interface.go | 7 | ||||
-rw-r--r-- | interfaces/server/interface.go | 19 | ||||
-rw-r--r-- | interfaces/status/interface.go | 11 |
9 files changed, 0 insertions, 120 deletions
diff --git a/interfaces/config/interface.go b/interfaces/config/interface.go deleted file mode 100755 index 2a7c67ce..00000000 --- a/interfaces/config/interface.go +++ /dev/null @@ -1,22 +0,0 @@ -package config - -type Configurer interface { - // UnmarshalKey reads configuration section into configuration object. - // - // func (h *HttpService) Init(cp config.Configurer) error { - // h.config := &HttpConfig{} - // if err := configProvider.UnmarshalKey("http", h.config); err != nil { - // return err - // } - // } - UnmarshalKey(name string, out interface{}) error - - // Get used to get config section - Get(name string) interface{} - - // Overwrite used to overwrite particular values in the unmarshalled config - Overwrite(values map[string]interface{}) error - - // Has checks if config section exists. - Has(name string) bool -} diff --git a/interfaces/informer/interface.go b/interfaces/informer/interface.go deleted file mode 100644 index b975edd7..00000000 --- a/interfaces/informer/interface.go +++ /dev/null @@ -1,10 +0,0 @@ -package informer - -import ( - "github.com/spiral/roadrunner/v2/interfaces/worker" -) - -// Informer used to get workers from particular plugin or set of plugins -type Informer interface { - Workers() []worker.BaseProcess -} diff --git a/interfaces/log/interface.go b/interfaces/log/interface.go deleted file mode 100644 index e2f2ce31..00000000 --- a/interfaces/log/interface.go +++ /dev/null @@ -1,16 +0,0 @@ -package log - -type ( - // Logger is an general RR log interface - Logger interface { - Debug(msg string, keyvals ...interface{}) - Info(msg string, keyvals ...interface{}) - Warn(msg string, keyvals ...interface{}) - Error(msg string, keyvals ...interface{}) - } -) - -// With creates a child logger and adds structured context to it -type WithLogger interface { - With(keyvals ...interface{}) Logger -} diff --git a/interfaces/metrics/interface.go b/interfaces/metrics/interface.go deleted file mode 100644 index 505c3d7b..00000000 --- a/interfaces/metrics/interface.go +++ /dev/null @@ -1,9 +0,0 @@ -package metrics - -import ( - "github.com/prometheus/client_golang/prometheus" -) - -type StatProvider interface { - MetricsCollector() []prometheus.Collector -} diff --git a/interfaces/redis/interface.go b/interfaces/redis/interface.go deleted file mode 100644 index 909c8ca4..00000000 --- a/interfaces/redis/interface.go +++ /dev/null @@ -1,9 +0,0 @@ -package redis - -import "github.com/go-redis/redis/v8" - -// Redis in the redis KV plugin interface -type Redis interface { - // GetClient - GetClient() redis.UniversalClient -} diff --git a/interfaces/resetter/interface.go b/interfaces/resetter/interface.go deleted file mode 100644 index 47d8d791..00000000 --- a/interfaces/resetter/interface.go +++ /dev/null @@ -1,17 +0,0 @@ -package resetter - -// If plugin implements Resettable interface, than it state can be resetted without reload in runtime via RPC/HTTP -type Resettable interface { - // Reset reload all plugins - Reset() error -} - -// Resetter interface is the Resetter plugin main interface -type Resetter interface { - // Reset all registered plugins - ResetAll() error - // Reset by plugin name - ResetByName(string) error - // GetAll registered plugins - GetAll() []string -} diff --git a/interfaces/rpc/interface.go b/interfaces/rpc/interface.go deleted file mode 100644 index 683fd2ec..00000000 --- a/interfaces/rpc/interface.go +++ /dev/null @@ -1,7 +0,0 @@ -package rpc - -// RPCer declares the ability to create set of public RPC methods. -type RPCer interface { - // Provides RPC methods for the given service. - RPC() interface{} -} diff --git a/interfaces/server/interface.go b/interfaces/server/interface.go deleted file mode 100644 index c50848d7..00000000 --- a/interfaces/server/interface.go +++ /dev/null @@ -1,19 +0,0 @@ -package server - -import ( - "context" - "os/exec" - - "github.com/spiral/roadrunner/v2/interfaces/pool" - "github.com/spiral/roadrunner/v2/interfaces/worker" - poolImpl "github.com/spiral/roadrunner/v2/pkg/pool" -) - -type Env map[string]string - -// Server creates workers for the application. -type Server interface { - CmdFactory(env Env) (func() *exec.Cmd, error) - NewWorker(ctx context.Context, env Env) (worker.BaseProcess, error) - NewWorkerPool(ctx context.Context, opt poolImpl.Config, env Env) (pool.Pool, error) -} diff --git a/interfaces/status/interface.go b/interfaces/status/interface.go deleted file mode 100644 index 0a92bc52..00000000 --- a/interfaces/status/interface.go +++ /dev/null @@ -1,11 +0,0 @@ -package status - -// Status consists of status code from the service -type Status struct { - Code int -} - -// Checker interface used to get latest status from plugin -type Checker interface { - Status() Status -} |