Documentation ¶
Index ¶
Constants ¶
View Source
const InvalidQueryRulesVersion int64 = -1
Invalid rule version, used to mark invalid query rules
View Source
const ZkCustomRuleSource string = "ZK_CUSTOM_RULE"
Zookeeper based custom rule source name
Variables ¶
This section is empty.
Functions ¶
func ActivateZkCustomRules ¶
func ActivateZkCustomRules(qsc tabletserver.QueryServiceControl)
ActivateZkCustomRules activates zookeeper dynamic custom rule mechanism
Types ¶
type ZkCustomRule ¶
type ZkCustomRule struct {
// contains filtered or unexported fields
}
ZkCustomRule is Zookeeper backed implementation of CustomRuleManager
func NewZkCustomRule ¶
func NewZkCustomRule(zkconn zk.Conn) *ZkCustomRule
NewZkCustomRule Creates new ZkCustomRule structure
func (*ZkCustomRule) Close ¶
func (zkcr *ZkCustomRule) Close()
Close signals an termination to polling go routine and closes Zookeeper connection object
func (*ZkCustomRule) GetRules ¶
func (zkcr *ZkCustomRule) GetRules() (qrs *tabletserver.QueryRules, version int64, err error)
GetRules retrives cached rules
func (*ZkCustomRule) Open ¶
func (zkcr *ZkCustomRule) Open(qsc tabletserver.QueryServiceControl, rulePath string) (err error)
Open Registers Zookeeper watch, gets inital QueryRules and starts polling routine
Click to show internal directories.
Click to hide internal directories.