Documentation ¶
Index ¶
- Constants
- type Ctx
- type FinalState
- type HTTPFilterPolicyWrapper
- type HTTPRoutePolicies
- type Info
- type InitState
- func (s *InitState) AddPolicyForHTTPRoute(policy *mosniov1.HTTPFilterPolicy, route *gwapiv1.HTTPRoute, ...)
- func (s *InitState) AddPolicyForVirtualService(policy *mosniov1.HTTPFilterPolicy, vs *istiov1b1.VirtualService, ...)
- func (s *InitState) GetGatewaysWithHTTPRoute(route *gwapiv1.HTTPRoute) []*gwapiv1.Gateway
- func (s *InitState) GetGatewaysWithVirtualService(vs *istiov1b1.VirtualService) []*istiov1b1.Gateway
- func (s *InitState) Process(original_ctx context.Context) (*FinalState, error)
- type PolicyScope
- type VirtualServicePolicies
Constants ¶
View Source
const (
AnnotationInfo = "htnn.mosn.io/info"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FinalState ¶
type FinalState struct {
EnvoyFilters map[string]*istiov1a3.EnvoyFilter
}
finalState is the end of the translation. We convert the state to EnvoyFilter and write it to k8s.
type HTTPFilterPolicyWrapper ¶
type HTTPFilterPolicyWrapper struct { *mosniov1.HTTPFilterPolicy // contains filtered or unexported fields }
type HTTPRoutePolicies ¶
type Info ¶
type Info struct { // HTTPFilterPolicies indicates what HTTPFilterPolicies are used to generated the EnvoyFilter. HTTPFilterPolicies []string `json:"httpfilterpolicies"` }
type InitState ¶
type InitState struct { VirtualServicePolicies map[types.NamespacedName]*VirtualServicePolicies HTTPRoutePolicies map[types.NamespacedName]*HTTPRoutePolicies // contains filtered or unexported fields }
InitState is the beginning of our translation.
func NewInitState ¶
func (*InitState) AddPolicyForHTTPRoute ¶
func (*InitState) AddPolicyForVirtualService ¶
func (s *InitState) AddPolicyForVirtualService(policy *mosniov1.HTTPFilterPolicy, vs *istiov1b1.VirtualService, gws []*istiov1b1.Gateway)
func (*InitState) GetGatewaysWithHTTPRoute ¶
func (*InitState) GetGatewaysWithVirtualService ¶
func (s *InitState) GetGatewaysWithVirtualService(vs *istiov1b1.VirtualService) []*istiov1b1.Gateway
type PolicyScope ¶
type PolicyScope int
const ( // sort from small to large PolicyScopeRule PolicyScope = iota // a route in a VirtualService or a rule in xRoute PolicyScopeRoute // a VirtualService or a xRoute )
type VirtualServicePolicies ¶
type VirtualServicePolicies struct { VirtualService *istiov1b1.VirtualService RoutePolicies map[string][]*HTTPFilterPolicyWrapper Gateways []*istiov1b1.Gateway }
Click to show internal directories.
Click to hide internal directories.