route_rule_conf

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductRouteRule

type ProductRouteRule map[string]RouteRules

ProductRouteRule holds mapping from product to rules.

type ProductRouteRuleFile

type ProductRouteRuleFile map[string]RouteRuleFiles

type RouteRule

type RouteRule struct {
	Cond        condition.Condition
	ClusterName string
}

RouteRule is composed by a condition and cluster to serve

type RouteRuleFile

type RouteRuleFile struct {
	Cond        *string
	ClusterName *string
}

type RouteRuleFiles

type RouteRuleFiles []RouteRuleFile

type RouteRules

type RouteRules []RouteRule

RouteRules is a list of rule.

type RouteTableConf

type RouteTableConf struct {
	Version string // version of the config
	RuleMap ProductRouteRule
}

func RouteConfLoad

func RouteConfLoad(filename string) (*RouteTableConf, error)

RouteConfLoad loads config of route table from file.

func (*RouteTableConf) LoadAndCheck

func (conf *RouteTableConf) LoadAndCheck(filename string) (string, error)

type RouteTableFile

type RouteTableFile struct {
	Version     *string               // version of the config
	ProductRule *ProductRouteRuleFile // product => rules
}

Jump to

Keyboard shortcuts

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