tokers commented on a change in pull request #176:
URL:
https://github.com/apache/apisix-ingress-controller/pull/176#discussion_r560774798
##########
File path: pkg/apisix/apisix.go
##########
@@ -73,39 +81,28 @@ type Upstream interface {
// Service is the specific client interface to take over the create, update,
// list and delete for APISIX's Service resource.
type Service interface {
+ Get(context.Context, string) (*v1.Service, error)
List(context.Context) ([]*v1.Service, error)
Create(context.Context, *v1.Service) (*v1.Service, error)
Delete(context.Context, *v1.Service) error
Update(context.Context, *v1.Service) (*v1.Service, error)
}
type apisix struct {
- defaultCluster Cluster
nonExistentCluster Cluster
- defaultClusterName string
clusters map[string]Cluster
}
-// NewForOptions creates an APISIX client to perform resources change pushing.
-// Users should carry a ClusterOptions to configure the default APISIX cluster.
-func NewForOptions(co *ClusterOptions) (APISIX, error) {
- defaultCluster, err := newCluster(co)
- if err != nil {
- return nil, err
- }
+// New creates an APISIX client to perform resources change pushing.
+func New() (APISIX, error) {
Review comment:
Changed to NewClient.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]