filecustomrule

package
v0.0.0-...-444a4ab Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2015 License: BSD-3-Clause Imports: 5 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.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

Jump to

Keyboard shortcuts

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