pilot

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPilotRefresh = 10 * time.Second

DefaultPilotRefresh is default pilot refresh time TODO: use stream instead

Functions

func DeleteRouteRuleByKey

func DeleteRouteRuleByKey(k string)

DeleteRouteRuleByKey set route rule by key

func GetRouteRule

func GetRouteRule() map[string][]*model.RouteRule

GetRouteRule get route rule

func GetRouteRuleByKey

func GetRouteRuleByKey(k string) []*model.RouteRule

GetRouteRuleByKey get route rule by key

func InitPilotFetcher

func InitPilotFetcher(o router.Options) error

InitPilotFetcher init the config mgr and add several sources

func SetRouteRule

func SetRouteRule(rule map[string][]*model.RouteRule)

SetRouteRule set route rule

func SetRouteRuleByKey

func SetRouteRuleByKey(k string, r []*model.RouteRule)

SetRouteRuleByKey set route rule by key

func VirtualHostsToRouteRule

func VirtualHostsToRouteRule(vh *envoy_api_v2_route.VirtualHost) []*model.RouteRule

VirtualHostsToRouteRule translate virtual hosts to route rule

func WeightedClustersToRouteRule

func WeightedClustersToRouteRule(w *envoy_api_v2_route.WeightedCluster, i int) *model.RouteRule

WeightedClustersToRouteRule translate weighted clusters to route rule

Types

type PilotRouter

type PilotRouter struct{}

PilotRouter is pilot router service

func (*PilotRouter) FetchRouteRule

func (r *PilotRouter) FetchRouteRule() map[string][]*model.RouteRule

FetchRouteRule return all rules

func (*PilotRouter) FetchRouteRuleByServiceName

func (r *PilotRouter) FetchRouteRuleByServiceName(service string) []*model.RouteRule

FetchRouteRuleByServiceName get rules for service

func (*PilotRouter) Init

func (r *PilotRouter) Init(o router.Options) error

Init init router config

func (*PilotRouter) InitRouteRuleByKey

func (r *PilotRouter) InitRouteRuleByKey(k string)

InitRouteRuleByKey init route rule by service key

func (*PilotRouter) SetRouteRule

func (r *PilotRouter) SetRouteRule(rr map[string][]*model.RouteRule)

SetRouteRule set rules

Jump to

Keyboard shortcuts

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