You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/13 01:00:21 UTC

[GitHub] [apisix-ingress-controller] tao12345666333 commented on a diff in pull request #989: feat: support ApisixConsumer v2

tao12345666333 commented on code in PR #989:
URL: https://github.com/apache/apisix-ingress-controller/pull/989#discussion_r871919984


##########
pkg/kube/apisix_consumer.go:
##########
@@ -0,0 +1,169 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package kube
+
+import (
+	"errors"
+
+	"github.com/apache/apisix-ingress-controller/pkg/config"
+	configv2 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2"
+	configv2beta3 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/apis/config/v2beta3"
+	listersv2 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/listers/config/v2"
+	listersv2beta3 "github.com/apache/apisix-ingress-controller/pkg/kube/apisix/client/listers/config/v2beta3"
+)
+
+// ApisixConsumerLister is an encapsulation for the lister of ApisixConsumer,
+// it aims at to be compatible with different ApisixConsumer versions.
+type ApisixConsumerLister interface {
+	// V2beta3 gets the ApisixConsumer in apisix.apache.org/v2beta3.
+	V2beta3(string, string) (ApisixConsumer, error)
+	// V2 gets the ApisixConsumer in apisix.apache.org/v2.
+	V2(string, string) (ApisixConsumer, error)
+}
+
+// ApisixConsumerInformer is an encapsulation for the informer of ApisixConsumer,
+// it aims at to be compatible with different ApisixConsumer versions.
+type ApisixConsumerInformer interface {
+	Run(chan struct{})
+}
+
+// ApisixConsumer is an encapsulation for ApisixConsumer resource with different
+// versions, for now, they are apisix.apache.org/v1 and apisix.apache.org/v2alpha1

Review Comment:
   v2beta3 and v2



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org