Files
flagger/pkg/router/nop.go
T
stefanprodan 448c210324 Release API version v1beta1
- bump Canary and MetricTemplate version to v1beta1
- regenerate clientset and CRD
2020-02-07 12:35:56 +02:00

25 lines
573 B
Go

package router
import (
flaggerv1 "github.com/weaveworks/flagger/pkg/apis/flagger/v1beta1"
)
// NopRouter no-operation router
type NopRouter struct {
}
func (*NopRouter) Reconcile(canary *flaggerv1.Canary) error {
return nil
}
func (*NopRouter) SetRoutes(canary *flaggerv1.Canary, primaryWeight int, canaryWeight int, mirror bool) error {
return nil
}
func (*NopRouter) GetRoutes(canary *flaggerv1.Canary) (primaryWeight int, canaryWeight int, mirror bool, err error) {
if canary.Status.Iterations > 0 {
return 0, 100, false, nil
}
return 100, 0, false, nil
}