diff options
author | Valery Piashchynski <[email protected]> | 2021-07-10 13:57:49 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-07-10 13:57:49 +0300 |
commit | 453eb10b436925ef91b1206e795e581e6293d132 (patch) | |
tree | 1bf08147397e2d68b7531039b989901a951c66df /plugins/memory | |
parent | 435cfae06a963cce2e85384afd3946b95e4b8344 (diff) |
Return structure instead of interface in places where that possible
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/memory')
-rw-r--r-- | plugins/memory/kv.go | 3 | ||||
-rw-r--r-- | plugins/memory/pubsub.go | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/plugins/memory/kv.go b/plugins/memory/kv.go index 3cec1f97..68ea7266 100644 --- a/plugins/memory/kv.go +++ b/plugins/memory/kv.go @@ -6,7 +6,6 @@ import ( "time" "github.com/spiral/errors" - kv "github.com/spiral/roadrunner/v2/common/kv" "github.com/spiral/roadrunner/v2/plugins/config" "github.com/spiral/roadrunner/v2/plugins/logger" kvv1 "github.com/spiral/roadrunner/v2/proto/kv/v1beta" @@ -21,7 +20,7 @@ type Driver struct { cfg *Config } -func NewInMemoryDriver(log logger.Logger, key string, cfgPlugin config.Configurer, stop chan struct{}) (kv.Storage, error) { +func NewInMemoryDriver(log logger.Logger, key string, cfgPlugin config.Configurer, stop chan struct{}) (*Driver, error) { const op = errors.Op("new_in_memory_driver") d := &Driver{ diff --git a/plugins/memory/pubsub.go b/plugins/memory/pubsub.go index 3c909900..c79f3eb0 100644 --- a/plugins/memory/pubsub.go +++ b/plugins/memory/pubsub.go @@ -17,7 +17,7 @@ type PubSubDriver struct { log logger.Logger } -func NewPubSubDriver(log logger.Logger, _ string) (pubsub.PubSub, error) { +func NewPubSubDriver(log logger.Logger, _ string) (*PubSubDriver, error) { ps := &PubSubDriver{ pushCh: make(chan *pubsub.Message, 10), storage: bst.NewBST(), |