diff options
author | Valery Piashchynski <[email protected]> | 2020-12-17 18:23:19 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-17 18:23:19 +0300 |
commit | fbd5adde5abae6f7adb7fcdafc226bcd3480d498 (patch) | |
tree | 59ce0499568e0d4fd889d43de9a5eb1b17907a8e /plugins/redis/config.go | |
parent | 7884349f27ed750825a0f4dea59af8964e182651 (diff) |
Move config interface to the interfaces folder. Initial redis plugin
structure
Diffstat (limited to 'plugins/redis/config.go')
-rw-r--r-- | plugins/redis/config.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/redis/config.go b/plugins/redis/config.go new file mode 100644 index 00000000..b39fcd00 --- /dev/null +++ b/plugins/redis/config.go @@ -0,0 +1,18 @@ +package redis + +type Config struct { + // Addr is address to use. If len > 1, cluster client will be used + Addr []string + // database number to use, 0 is used by default + DB int + // Master name for failover client, empty by default + Master string + // Redis password, empty by default + Password string +} + +// InitDefaults initializing fill config with default values +func (s *Config) InitDefaults() error { + s.Addr = []string{"localhost:6379"} // default addr is pointing to local storage + return nil +} |