Documentation ¶
Index ¶
- Constants
- func BuildRouteConfiguration(cls *traffic.TrafficRouter) *routev3.RouteConfiguration
- type CRDCache
- func (c *CRDCache) DeleteByNamespaceApp(n model.NamespacedApp, name string)
- func (c *CRDCache) DeleteByNamespacedName(n types.NamespacedName)
- func (c *CRDCache) GetAppByNamespacedName(n types.NamespacedName) (string, bool)
- func (c *CRDCache) GetByNamespaceApp(n model.NamespacedApp) ([]client.Object, int64)
- func (c *CRDCache) GetByNamespacedName(n types.NamespacedName) (client.Object, bool)
- func (c *CRDCache) SetByNamespaceApp(n model.NamespacedApp, object client.Object) int
- func (c *CRDCache) SetByNamespacedName(n types.NamespacedName, object client.Object)
- type CRDGenerator
- type CRDKind
- type CRDMetadata
- type CRDObjectsHolder
- type CRDType
- type CRDWatcher
- func (r *CRDWatcher) AddSubscribeTarget(target model.SubscribeTarget) error
- func (r *CRDWatcher) GetRules(n model.NamespacedApp) ([]*anypb.Any, int64)
- func (r *CRDWatcher) HasAnySubscribedOfApp(app model.NamespacedApp) bool
- func (r *CRDWatcher) HasAnySubscribedOfNamespace(namespace string) bool
- func (r *CRDWatcher) HasSubscribed(target model.SubscribeTarget) bool
- func (r *CRDWatcher) Kind() model.SubscribeKind
- func (r *CRDWatcher) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *CRDWatcher) RemoveSubscribeTarget(target model.SubscribeTarget) error
- func (r *CRDWatcher) SetupWithManager(mgr ctrl.Manager) error
- type KubernetesOperator
- func (k *KubernetesOperator) AddWatcher(target model.SubscribeTarget) error
- func (k *KubernetesOperator) Close() error
- func (k *KubernetesOperator) ComponentName() string
- func (k *KubernetesOperator) GetWatcher(kind string) (*CRDWatcher, bool)
- func (k *KubernetesOperator) RegisterControllersAndStart(info model.SubscribeTarget) error
- func (k *KubernetesOperator) RegisterWatcher(target model.SubscribeTarget) (*CRDWatcher, error)
- func (k *KubernetesOperator) Run() error
Constants ¶
View Source
const ( FaultToleranceRuleKind = "fault-tolerance.opensergo.io/v1alpha1/FaultToleranceRule" RateLimitStrategyKind = "fault-tolerance.opensergo.io/v1alpha1/RateLimitStrategy" ThrottlingStrategyKind = "fault-tolerance.opensergo.io/v1alpha1/ThrottlingStrategy" ConcurrencyLimitStrategyKind = "fault-tolerance.opensergo.io/v1alpha1/ConcurrencyLimitStrategy" CircuitBreakerStrategyKind = "fault-tolerance.opensergo.io/v1alpha1/CircuitBreakerStrategy" TrafficRouterKind = "traffic.opensergo.io/v1alpha1/TrafficRouter" )
View Source
const ( UpdateRule = 201 DeleteRule = 202 AddRule = 203 )
View Source
const (
EXTENSION_ROUTE_FALL_BACK = "envoy.router.cluster_specifier_plugin.cluster_fallback"
)
Variables ¶
This section is empty.
Functions ¶
func BuildRouteConfiguration ¶
func BuildRouteConfiguration(cls *traffic.TrafficRouter) *routev3.RouteConfiguration
BuildRouteConfiguration for Istio RouteConfiguration
Types ¶
type CRDCache ¶
type CRDCache struct {
// contains filtered or unexported fields
}
CRDCache caches versioned CRD objects in local.
func NewCRDCache ¶
func (*CRDCache) DeleteByNamespaceApp ¶
func (c *CRDCache) DeleteByNamespaceApp(n model.NamespacedApp, name string)
func (*CRDCache) DeleteByNamespacedName ¶
func (c *CRDCache) DeleteByNamespacedName(n types.NamespacedName)
func (*CRDCache) GetAppByNamespacedName ¶
func (c *CRDCache) GetAppByNamespacedName(n types.NamespacedName) (string, bool)
func (*CRDCache) GetByNamespaceApp ¶
func (*CRDCache) GetByNamespacedName ¶
func (*CRDCache) SetByNamespaceApp ¶
func (*CRDCache) SetByNamespacedName ¶
func (c *CRDCache) SetByNamespacedName(n types.NamespacedName, object client.Object)
type CRDGenerator ¶
CRDGenerator represents a generator function of an OpenSergo CRD.
type CRDMetadata ¶
type CRDMetadata struct {
// contains filtered or unexported fields
}
func GetCrdMetadata ¶
func GetCrdMetadata(kind CRDKind) (*CRDMetadata, bool)
func NewCRDMetadata ¶
func NewCRDMetadata(kind CRDKind, generator CRDGenerator) *CRDMetadata
func (*CRDMetadata) Generator ¶
func (m *CRDMetadata) Generator() CRDGenerator
func (*CRDMetadata) Kind ¶
func (m *CRDMetadata) Kind() CRDKind
type CRDObjectsHolder ¶
type CRDObjectsHolder struct {
// contains filtered or unexported fields
}
type CRDWatcher ¶
CRDWatcher watches a specific kind of CRD.
func NewCRDWatcher ¶
func NewCRDWatcher(crdManager ctrl.Manager, kind model.SubscribeKind, crdGenerator func() client.Object, sendDataHandler model.DataEntirePushHandler) *CRDWatcher
func (*CRDWatcher) AddSubscribeTarget ¶
func (r *CRDWatcher) AddSubscribeTarget(target model.SubscribeTarget) error
func (*CRDWatcher) GetRules ¶
func (r *CRDWatcher) GetRules(n model.NamespacedApp) ([]*anypb.Any, int64)
func (*CRDWatcher) HasAnySubscribedOfApp ¶
func (r *CRDWatcher) HasAnySubscribedOfApp(app model.NamespacedApp) bool
func (*CRDWatcher) HasAnySubscribedOfNamespace ¶
func (r *CRDWatcher) HasAnySubscribedOfNamespace(namespace string) bool
func (*CRDWatcher) HasSubscribed ¶
func (r *CRDWatcher) HasSubscribed(target model.SubscribeTarget) bool
func (*CRDWatcher) Kind ¶
func (r *CRDWatcher) Kind() model.SubscribeKind
func (*CRDWatcher) RemoveSubscribeTarget ¶
func (r *CRDWatcher) RemoveSubscribeTarget(target model.SubscribeTarget) error
func (*CRDWatcher) SetupWithManager ¶
func (r *CRDWatcher) SetupWithManager(mgr ctrl.Manager) error
type KubernetesOperator ¶
type KubernetesOperator struct {
// contains filtered or unexported fields
}
func NewKubernetesOperator ¶
func NewKubernetesOperator(sendDataHandler model.DataEntirePushHandler) (*KubernetesOperator, error)
NewKubernetesOperator creates a OpenSergo Kubernetes operator.
func (*KubernetesOperator) AddWatcher ¶
func (k *KubernetesOperator) AddWatcher(target model.SubscribeTarget) error
func (*KubernetesOperator) Close ¶
func (k *KubernetesOperator) Close() error
Close exit the K8S KubernetesOperator
func (*KubernetesOperator) ComponentName ¶
func (k *KubernetesOperator) ComponentName() string
func (*KubernetesOperator) GetWatcher ¶
func (k *KubernetesOperator) GetWatcher(kind string) (*CRDWatcher, bool)
func (*KubernetesOperator) RegisterControllersAndStart ¶
func (k *KubernetesOperator) RegisterControllersAndStart(info model.SubscribeTarget) error
func (*KubernetesOperator) RegisterWatcher ¶
func (k *KubernetesOperator) RegisterWatcher(target model.SubscribeTarget) (*CRDWatcher, error)
RegisterWatcher registers given CRD type and CRD name. For each CRD type, it can be registered only once.
func (*KubernetesOperator) Run ¶
func (k *KubernetesOperator) Run() error
Run runs the k8s KubernetesOperator
Click to show internal directories.
Click to hide internal directories.