diff options
author | Valery Piashchynski <[email protected]> | 2021-06-24 17:40:49 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-24 17:40:49 +0300 |
commit | e9249c7896331bab97a18a7ee0db17803fdd31fb (patch) | |
tree | 99512001f757eb88614acb9b20dada3200008a5d /plugins/kv/drivers/memcached | |
parent | ce53a8e149b76f15e8a5dd88ac3b953798d57e8b (diff) | |
parent | 60001dbe15b5ff0fec32239ad18b3d308a4150b5 (diff) |
#736 feat(kv): `clear` RPC method which completely cleans storagev2.3.1-beta.6
#736 feat(kv): `clear` RPC method which completely cleans storage
Diffstat (limited to 'plugins/kv/drivers/memcached')
-rw-r--r-- | plugins/kv/drivers/memcached/driver.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/kv/drivers/memcached/driver.go b/plugins/kv/drivers/memcached/driver.go index a2787d72..14e7c078 100644 --- a/plugins/kv/drivers/memcached/driver.go +++ b/plugins/kv/drivers/memcached/driver.go @@ -237,3 +237,13 @@ func (d *Driver) Delete(keys ...string) error { } return nil } + +func (d *Driver) Clear() error { + err := d.client.DeleteAll() + if err != nil { + d.log.Error("flush_all operation failed", "error", err) + return err + } + + return nil +} |