zkcustomrule

package
v2.0.0-beta.1+incompat... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2016 License: BSD-3-Clause Imports: 9 Imported by: 0

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.Controller)

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.Controller, rulePath string) (err error)

Open Registers Zookeeper watch, gets inital QueryRules and starts polling routine

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL