filecustomrule

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

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

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 *rules.Rules, version int64, err error)

GetRules returns query rules built from local file

func (*FileCustomRule) Open

func (fcr *FileCustomRule) Open(qsc tabletserver.Controller, rulePath string) error

Open try to build query rules from local file and push the rules to vttablet

Jump to

Keyboard shortcuts

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