Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompositeController ¶ added in v0.6.0
type CompositeController []NetworkProvider
CompositeController is a set of NetworkProvider
func (CompositeController) EnsureRoutes ¶ added in v0.6.0
func (c CompositeController) EnsureRoutes(ctx context.Context, strategy *v1beta1.TrafficRoutingStrategy) (bool, error)
func (CompositeController) Finalise ¶ added in v0.6.0
func (c CompositeController) Finalise(ctx context.Context) (bool, error)
func (CompositeController) Initialize ¶ added in v0.6.0
func (c CompositeController) Initialize(ctx context.Context) error
type NetworkProvider ¶
type NetworkProvider interface {
// Initialize only determine if the network resources(ingress & gateway api) exist.
// If error is nil, then the network resources exist.
Initialize(ctx context.Context) error
// EnsureRoutes check and set routes, e.g. canary weight and match conditions.
// 1. Canary weight specifies the relative proportion of traffic to be forwarded to the canary service within the range of [0,100]
// 2. Match conditions indicates rules to be satisfied for A/B testing scenarios, such as header, cookie, queryParams etc.
// Return true if and only if the route resources have been correctly updated and does not change in this round of reconciliation.
// Otherwise, return false to wait for the eventual consistency.
EnsureRoutes(ctx context.Context, strategy *v1beta1.TrafficRoutingStrategy) (bool, error)
// Finalise will do some cleanup work after the canary rollout complete, such as delete canary ingress.
// if error is nil, the return bool value means if the resources are modified
Finalise(ctx context.Context) (bool, error)
}
NetworkProvider common function across all TrafficRouting implementation
Click to show internal directories.
Click to hide internal directories.