Documentation ¶
Index ¶
- Variables
- func DeleteRouteRuleByKey(k string)
- func GetRouteRule() map[string][]*model.RouteRule
- func GetRouteRuleByKey(k string) []*model.RouteRule
- func InitPilotFetcher(o router.Options) error
- func SetRouteRule(rule map[string][]*model.RouteRule)
- func SetRouteRuleByKey(k string, r []*model.RouteRule)
- func VirtualHostsToRouteRule(vh *envoy_api_v2_route.VirtualHost) []*model.RouteRule
- func WeightedClustersToRouteRule(w *envoy_api_v2_route.WeightedCluster, i int) *model.RouteRule
- type PilotRouter
- func (r *PilotRouter) FetchRouteRule() map[string][]*model.RouteRule
- func (r *PilotRouter) FetchRouteRuleByServiceName(service string) []*model.RouteRule
- func (r *PilotRouter) Init(o router.Options) error
- func (r *PilotRouter) InitRouteRuleByKey(k string)
- func (r *PilotRouter) SetRouteRule(rr map[string][]*model.RouteRule)
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 GetRouteRuleByKey ¶
GetRouteRuleByKey get route rule by key
func InitPilotFetcher ¶
InitPilotFetcher init the config mgr and add several sources
func SetRouteRule ¶
SetRouteRule set route rule
func SetRouteRuleByKey ¶
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
Click to show internal directories.
Click to hide internal directories.