Documentation
¶
Overview ¶
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.
Index ¶
- type Common
- func (c *Common) RecordEvent(object runtime.Object, eventtype, reason string, err error)
- func (c *Common) RecordEventS(object runtime.Object, eventtype, reason string, msg string)
- func (c *Common) SyncClusterManifests(ctx context.Context, clusterName string, ...) error
- func (c *Common) SyncConsumer(ctx context.Context, consumer *apisixv1.Consumer, event types.EventType) (err error)
- func (c *Common) SyncManifests(ctx context.Context, added, updated, deleted *utils.Manifest, ...) error
- func (c *Common) SyncPluginMetadata(ctx context.Context, pm *apisixv1.PluginMetadata, event types.EventType) (err error)
- func (c *Common) SyncSSL(ctx context.Context, ssl *apisixv1.Ssl, event types.EventType) error
- func (c *Common) SyncUpstreamNodesChangeToCluster(ctx context.Context, cluster apisix.Cluster, nodes apisixv1.UpstreamNodes, ...) error
- type ListerInformer
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Common ¶
type Common struct {
*config.Config
*ListerInformer
Elector *leaderelection.LeaderElector
ControllerNamespace string
APISIX apisix.APISIX
KubeClient *kube.KubeClient
MetricsCollector metrics.Collector
Recorder record.EventRecorder
}
func (*Common) RecordEvent ¶
RecordEvent recorder events for resources
func (*Common) RecordEventS ¶
RecordEventS recorder events for resources
func (*Common) SyncClusterManifests ¶
func (c *Common) SyncClusterManifests(ctx context.Context, clusterName string, added, updated, deleted *utils.Manifest, shouldCompare bool) error
TODO: support multiple cluster
func (*Common) SyncConsumer ¶
func (*Common) SyncManifests ¶
func (c *Common) SyncManifests(ctx context.Context, added, updated, deleted *utils.Manifest, shouldCompare bool) error
TODO: Move sync utils to apisix.APISIX interface?
func (*Common) SyncPluginMetadata ¶
type ListerInformer ¶
type ListerInformer struct {
KubeFactory informers.SharedInformerFactory
ApisixFactory externalversions.SharedInformerFactory
NamespaceInformer cache.SharedIndexInformer
NamespaceLister listerscorev1.NamespaceLister
EpLister kube.EndpointLister
EpInformer cache.SharedIndexInformer
SvcLister listerscorev1.ServiceLister
SvcInformer cache.SharedIndexInformer
SecretLister listerscorev1.SecretLister
SecretInformer cache.SharedIndexInformer
PodLister listerscorev1.PodLister
PodInformer cache.SharedIndexInformer
ConfigMapLister listerscorev1.ConfigMapLister
ConfigMapInformer cache.SharedIndexInformer
IngressLister kube.IngressLister
IngressInformer cache.SharedIndexInformer
ApisixUpstreamInformer cache.SharedIndexInformer
ApisixRouteInformer cache.SharedIndexInformer
ApisixPluginConfigInformer cache.SharedIndexInformer
ApisixConsumerInformer cache.SharedIndexInformer
ApisixTlsInformer cache.SharedIndexInformer
ApisixClusterConfigInformer cache.SharedIndexInformer
ApisixGlobalRuleInformer cache.SharedIndexInformer
ApisixRouteLister kube.ApisixRouteLister
ApisixUpstreamLister kube.ApisixUpstreamLister
ApisixPluginConfigLister kube.ApisixPluginConfigLister
ApisixConsumerLister kube.ApisixConsumerLister
ApisixTlsLister kube.ApisixTlsLister
ApisixClusterConfigLister kube.ApisixClusterConfigLister
ApisixGlobalRuleLister kube.ApisixGlobalRuleLister
}
func (*ListerInformer) StartAndWaitForCacheSync ¶
func (c *ListerInformer) StartAndWaitForCacheSync(ctx context.Context) bool