Documentation ¶
Overview ¶
Package filecustomrule implements static custom rule from a config file
Index ¶
Constants ¶
View Source
const FileCustomRuleSource string = "FILE_CUSTOM_RULE"
FileCustomRuleSource is the name of the file based custom rule source
Variables ¶
This section is empty.
Functions ¶
func ActivateFileCustomRules ¶
func ActivateFileCustomRules(qsc tabletserver.QueryServiceControl)
ActivateFileCustomRules activates this static file based custom rule mechanism
Types ¶
type FileCustomRule ¶
type FileCustomRule struct {
// contains filtered or unexported fields
}
FileCustomRule is an implementation of CustomRuleManager, it reads custom query rules from local file for once and push it to vttablet
func NewFileCustomRule ¶
func NewFileCustomRule() (fcr *FileCustomRule)
NewFileCustomRule returns pointer to new FileCustomRule structure
func (*FileCustomRule) GetRules ¶
func (fcr *FileCustomRule) GetRules() (qrs *tabletserver.QueryRules, version int64, err error)
GetRules returns query rules built from local file
func (*FileCustomRule) Open ¶
func (fcr *FileCustomRule) Open(qsc tabletserver.QueryServiceControl, rulePath string) error
Open try to build query rules from local file and push the rules to vttablet
Click to show internal directories.
Click to hide internal directories.