Documentation ¶
Index ¶
Constants ¶
View Source
const ( // RedisStartWaitDefault default stop duration (sec) RedisStartWaitDefault = 10 * time.Second // RedisStartDelayDefault default start delay duration (sec) RedisStartDelayDefault = 10 * time.Second // HTTPServerAddrDefault default http server address HTTPServerAddrDefault = "0.0.0.0:8080" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { KubeConfigFile string Master string Redis config.Redis Cluster config.Cluster RedisStartWait time.Duration RedisStartDelay time.Duration HTTPServerAddr string }
Config contains configuration for redis-operator
func NewRedisNodeConfig ¶
func NewRedisNodeConfig() *Config
NewRedisNodeConfig builds and returns a redis-operator Config
type Node ¶
type Node struct { Addr string RedisAdmin redis.AdminInterface // contains filtered or unexported fields }
Node struct that represent a RedisNodeWrapper
func NewNode ¶
func NewNode(c *Config, admin redis.AdminInterface) *Node
NewNode return a instance of a Node
func (*Node) AttachNodeToCluster ¶
AttachNodeToCluster used to attach the current node to a redis cluster
func (*Node) ClearDataFolder ¶
ClearDataFolder completely erase all files in the /data folder
func (*Node) ForgetNode ¶
ForgetNode used to remove a node for a cluster
func (*Node) InitRedisCluster ¶
InitRedisCluster used to init a redis cluster with the current node
func (*Node) StartFailover ¶
StartFailover start Failover if needed
func (*Node) UpdateNodeConfigFile ¶
UpdateNodeConfigFile update the redis config file with node information: ip, port
type RedisNode ¶
type RedisNode struct {
// contains filtered or unexported fields
}
RedisNode constains all info to run the redis-node.
func NewRedisNode ¶
NewRedisNode builds and returns new RedisNode instance
Click to show internal directories.
Click to hide internal directories.