Documentation
¶
Index ¶
- Constants
- func SlotsToInt(slots []string) []int
- func SlotsToString(slots []int) []string
- type Client
- func (s *Client) ChangeMyselfToMaster(ip, password string) error
- func (s *Client) ChangePassword(ip, password, newPassword string) error
- func (s *Client) ClusterNodeInfo(ip, password string) (*Node, error)
- func (s *Client) ClusterVersion(ip, password string) (int, error)
- func (s *Client) CreateMonitor(sentinelIP, password, master, ip, kvPass string) error
- func (s *Client) GetConfig(ip, password, key string) (*string, error)
- func (s *Client) GetMaster(ip, password string) (string, error)
- func (s *Client) GetMasterFromSentinel(sentinelIP, sentinelPassword, master string) (string, error)
- func (s *Client) GetOffset(ip, password string) (int, error)
- func (s *Client) MoveSlots(ip, password string, slot int, dstNodeId string) bool
- func (s *Client) NodeInfo(ip, password string) (node Node, err error)
- func (s *Client) Ping(ip, password string) bool
- func (s *Client) RemoveMonitor(sentinelIP, password, master string) error
- func (s *Client) ResetMonitor(sentinelIP, sentinelPassword, master, password string) error
- func (s *Client) ResetSlot(ip, password string, slot, version int, dstNodeId string) error
- func (s *Client) SetClusterID(ip, password, nodeID string) error
- func (s *Client) SetConfig(ip, password string, key, value string) error
- func (s *Client) SetTopoMsg(ip, password, topoMsg string, version int) error
- func (s *Client) SlaveOf(slaveIP, masterIP, password string) error
- func (s *Client) SubOdownMsg(ip, password string) (*redis.PubSub, func())
- type ImportMsg
- type MigrateMsg
- type Node
Constants ¶
View Source
const ( ClusterNotInitErr = "CLUSTERDOWN The cluster is not initialized" ClusterAlreadyMigrate = "Can't migrate slot which has been migrated" ClusterSlotInvalid = "Can't migrate slot which doesn't belong to me" ClusterVersionInvalid = "Invalid cluster version" ClusterInvalidVersion = "Invalid version of cluster" )
View Source
const ( KVRocksPort = 6379 SentinelPort = 26379 SuperUser = "superuser" RoleMaster = "master" RoleSlaver = "slave" Quorum = 2 HashSlotCount = 16384 )
View Source
const ErrPassword = "ERR invalid password"
Variables ¶
This section is empty.
Functions ¶
func SlotsToInt ¶
func SlotsToString ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewKVRocksClient ¶
func (*Client) ChangeMyselfToMaster ¶
func (*Client) ChangePassword ¶
func (*Client) ClusterNodeInfo ¶
func (*Client) CreateMonitor ¶
func (*Client) GetMasterFromSentinel ¶
func (*Client) RemoveMonitor ¶
func (*Client) ResetMonitor ¶
func (*Client) SetClusterID ¶
func (*Client) SetTopoMsg ¶
func (*Client) SubOdownMsg ¶
type MigrateMsg ¶
Click to show internal directories.
Click to hide internal directories.