Documentation ¶
Index ¶
- func AcceptedCondition(policy client.Object) metav1.Condition
- func ConditionPointer(condition metav1.Condition) *metav1.Condition
- func ConflictCondition(policy client.Object, message string) metav1.Condition
- func InvalidCondition(policy client.Object, message string) metav1.Condition
- func NotFoundCondition(policy client.Object, message string) metav1.Condition
- type FindConflictFunc
- type FindConflictPortFunc
- type FindConflictedGRPCRouteBasedPolicyFunc
- type FindConflictedHTTPRouteBasedPolicyFunc
- type FindConflictedHostnamesBasedPolicyFunc
- type GetAttachedPoliciesFunc
- type GetObjectByGroupKindFunc
- type GetPoliciesFunc
- type PolicyStatusProcessor
- type RouteInfo
- type ServicePolicyStatusProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AcceptedCondition ¶
AcceptedCondition returns the accepted condition with the given message for the policy
func ConditionPointer ¶
ConditionPointer returns the pointer of the given condition
func ConflictCondition ¶
ConflictCondition returns the conflict condition with the given message for the policy
func InvalidCondition ¶
InvalidCondition returns the invalid condition with the given message for the policy
Types ¶
type FindConflictFunc ¶
type FindConflictFunc func(policy client.Object, allPolicies []client.Object, port int32) *types.NamespacedName
FindConflictFunc is a function for finding conflicted policy for a service port
type FindConflictPortFunc ¶
type FindConflictPortFunc func(gateway *gwv1beta1.Gateway, policy client.Object, allPortLevelPolicies []client.Object) *types.NamespacedName
FindConflictPortFunc finds the conflicted port level policy
type FindConflictedGRPCRouteBasedPolicyFunc ¶
type FindConflictedGRPCRouteBasedPolicyFunc func(route *gwv1alpha2.GRPCRoute, policy client.Object, allRouteBasedPolicies []client.Object) *types.NamespacedName
FindConflictedGRPCRouteBasedPolicyFunc finds the conflicted GRPCRoute based policy
type FindConflictedHTTPRouteBasedPolicyFunc ¶
type FindConflictedHTTPRouteBasedPolicyFunc func(route *gwv1beta1.HTTPRoute, policy client.Object, allRouteBasedPolicies []client.Object) *types.NamespacedName
FindConflictedHTTPRouteBasedPolicyFunc finds the conflicted HTTPRoute based policy
type FindConflictedHostnamesBasedPolicyFunc ¶
type FindConflictedHostnamesBasedPolicyFunc func(route RouteInfo, policy client.Object, allHostnamesBasedPolicies []client.Object) *types.NamespacedName
FindConflictedHostnamesBasedPolicyFunc finds the conflicted hostnames based policy
type GetAttachedPoliciesFunc ¶
type GetAttachedPoliciesFunc func(policy client.Object, svc client.Object) ([]client.Object, *metav1.Condition)
GetAttachedPoliciesFunc is a function for getting attached policies for a service
type GetObjectByGroupKindFunc ¶
GetObjectByGroupKindFunc returns the object by group and kind
type GetPoliciesFunc ¶
type GetPoliciesFunc func(policy client.Object, target client.Object) (map[gwpkg.PolicyMatchType][]client.Object, *metav1.Condition)
GetPoliciesFunc returns the policies, and returns condition if there is any error
type PolicyStatusProcessor ¶
type PolicyStatusProcessor struct { client.Client GetPolicies GetPoliciesFunc FindConflictPort FindConflictPortFunc FindConflictedHostnamesBasedPolicy FindConflictedHostnamesBasedPolicyFunc FindConflictedHTTPRouteBasedPolicy FindConflictedHTTPRouteBasedPolicyFunc FindConflictedGRPCRouteBasedPolicy FindConflictedGRPCRouteBasedPolicyFunc GroupKindObjectMapping map[string]map[string]client.Object }
PolicyStatusProcessor is a processor for processing port level policy status
func (*PolicyStatusProcessor) Process ¶
func (p *PolicyStatusProcessor) Process(ctx context.Context, policy client.Object, targetRef gwv1alpha2.PolicyTargetReference) metav1.Condition
Process processes the policy status of port, hostnames and route level
type RouteInfo ¶
type RouteInfo struct { Meta metav1.Object Parents []gwv1beta1.RouteParentStatus GVK schema.GroupVersionKind Generation int64 Hostnames []gwv1beta1.Hostname }
RouteInfo is a struct for storing route information
type ServicePolicyStatusProcessor ¶
type ServicePolicyStatusProcessor struct { client.Client GetAttachedPolicies GetAttachedPoliciesFunc FindConflict FindConflictFunc GroupKindObjectMapping map[string]map[string]client.Object }
ServicePolicyStatusProcessor is an interface for processing service level policy status
func (*ServicePolicyStatusProcessor) Process ¶
func (p *ServicePolicyStatusProcessor) Process(ctx context.Context, policy client.Object, targetRef gwv1alpha2.PolicyTargetReference) metav1.Condition
Process processes the service level policy status