-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support comparison in resource sync (#1742)
- Loading branch information
1 parent
0602314
commit 2cb99b8
Showing
63 changed files
with
2,095 additions
and
687 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
// 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 cache | ||
|
||
import ( | ||
v1 "github.com/apache/apisix-ingress-controller/pkg/types/apisix/v1" | ||
) | ||
|
||
type noopCache struct { | ||
} | ||
|
||
// NewMemDBCache creates a Cache object backs with a memory DB. | ||
func NewNoopDBCache() (Cache, error) { | ||
return &noopCache{}, nil | ||
} | ||
|
||
func (c *noopCache) InsertRoute(r *v1.Route) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) InsertSSL(ssl *v1.Ssl) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) InsertUpstream(u *v1.Upstream) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) InsertStreamRoute(sr *v1.StreamRoute) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) InsertGlobalRule(gr *v1.GlobalRule) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) InsertConsumer(consumer *v1.Consumer) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) InsertSchema(schema *v1.Schema) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) InsertPluginConfig(pc *v1.PluginConfig) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) InsertUpstreamServiceRelation(us *v1.UpstreamServiceRelation) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) GetRoute(id string) (*v1.Route, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) GetSSL(id string) (*v1.Ssl, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) GetUpstream(id string) (*v1.Upstream, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) GetStreamRoute(id string) (*v1.StreamRoute, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) GetGlobalRule(id string) (*v1.GlobalRule, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) GetConsumer(username string) (*v1.Consumer, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) GetSchema(name string) (*v1.Schema, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) GetPluginConfig(name string) (*v1.PluginConfig, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) GetUpstreamServiceRelation(serviceName string) (*v1.UpstreamServiceRelation, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListRoutes() ([]*v1.Route, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListSSL() ([]*v1.Ssl, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListUpstreams() ([]*v1.Upstream, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListStreamRoutes() ([]*v1.StreamRoute, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListGlobalRules() ([]*v1.GlobalRule, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListConsumers() ([]*v1.Consumer, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListSchema() ([]*v1.Schema, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListPluginConfigs() ([]*v1.PluginConfig, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) ListUpstreamServiceRelation() ([]*v1.UpstreamServiceRelation, error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *noopCache) DeleteRoute(r *v1.Route) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) DeleteSSL(ssl *v1.Ssl) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) DeleteUpstream(u *v1.Upstream) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) DeleteStreamRoute(sr *v1.StreamRoute) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) DeleteGlobalRule(gr *v1.GlobalRule) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) DeleteConsumer(consumer *v1.Consumer) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) DeleteSchema(schema *v1.Schema) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) DeletePluginConfig(pc *v1.PluginConfig) error { | ||
return nil | ||
} | ||
|
||
func (c *noopCache) DeleteUpstreamServiceRelation(us *v1.UpstreamServiceRelation) error { | ||
return nil | ||
} |
Oops, something went wrong.