v1alpha1

package
v0.0.0-...-ac5cff2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the OpenSergo fault-tolerance v1alpha1 CRD. +kubebuilder:object:generate=true +groupName=fault-tolerance.opensergo.io

Index

Constants

View Source
const (
	RateLimitStrategyKind        string = "RateLimitStrategy"
	ConcurrencyLimitStrategyKind string = "ConcurrencyLimitStrategy"
)
View Source
const (
	RequestAmountMetricType string = "RequestAmount"

	LocalLimitMode  string = "Local"
	GlobalLimitMode string = "Global"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "fault-tolerance.opensergo.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type CircuitBreakerStrategy

type CircuitBreakerStrategy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec CircuitBreakerStrategySpec `json:"spec,omitempty"`

	Status CircuitBreakerStrategyStatus `json:"status,omitempty"`
}

func (*CircuitBreakerStrategy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakerStrategy.

func (*CircuitBreakerStrategy) DeepCopyInto

func (in *CircuitBreakerStrategy) DeepCopyInto(out *CircuitBreakerStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CircuitBreakerStrategy) DeepCopyObject

func (in *CircuitBreakerStrategy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CircuitBreakerStrategyList

type CircuitBreakerStrategyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []CircuitBreakerStrategy `json:"items"`
}

CircuitBreakerStrategyList contains a list of CircuitBreakerStrategy.

func (*CircuitBreakerStrategyList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakerStrategyList.

func (*CircuitBreakerStrategyList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CircuitBreakerStrategyList) DeepCopyObject

func (in *CircuitBreakerStrategyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type CircuitBreakerStrategySpec

type CircuitBreakerStrategySpec struct {
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Enum=SlowRequestRatio;ErrorRequestRatio
	// +kubebuilder:validation:Required
	Strategy string `json:"strategy"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^([1-9]\d?|100|0)%$
	TriggerRatio string `json:"triggerRatio"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^[1-9]\d*(s|ms|m|min|minute|h|d)$
	StatDuration string `json:"statDuration"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^[1-9]\d*(s|ms|m|min|minute|h|d)$
	RecoveryTimeout string `json:"recoveryTimeout"`

	// +kubebuilder:validation:Type=integer
	// +kubebuilder:validation:Format=int32
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Required
	MinRequestAmount int32 `json:"minRequestAmount"`

	SlowConditions SlowConditions `json:"slowConditions,omitempty"`

	ErrorConditions ErrorConditions `json:"errorConditions,omitempty"`
}

CircuitBreakerStrategySpec defines the spec of CircuitBreakerStrategy.

func (*CircuitBreakerStrategySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakerStrategySpec.

func (*CircuitBreakerStrategySpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CircuitBreakerStrategyStatus

type CircuitBreakerStrategyStatus struct {
}

CircuitBreakerStrategyStatus defines the observed state of CircuitBreakerStrategy.

func (*CircuitBreakerStrategyStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakerStrategyStatus.

func (*CircuitBreakerStrategyStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConcurrencyLimitStrategy

type ConcurrencyLimitStrategy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ConcurrencyLimitStrategySpec `json:"spec,omitempty"`

	Status ConcurrencyLimitStrategyStatus `json:"status,omitempty"`
}

func (*ConcurrencyLimitStrategy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConcurrencyLimitStrategy.

func (*ConcurrencyLimitStrategy) DeepCopyInto

func (in *ConcurrencyLimitStrategy) DeepCopyInto(out *ConcurrencyLimitStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConcurrencyLimitStrategy) DeepCopyObject

func (in *ConcurrencyLimitStrategy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConcurrencyLimitStrategyList

type ConcurrencyLimitStrategyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ConcurrencyLimitStrategy `json:"items"`
}

ConcurrencyLimitStrategyList contains a list of ConcurrencyLimitStrategy.

func (*ConcurrencyLimitStrategyList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConcurrencyLimitStrategyList.

func (*ConcurrencyLimitStrategyList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConcurrencyLimitStrategyList) DeepCopyObject

func (in *ConcurrencyLimitStrategyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConcurrencyLimitStrategySpec

type ConcurrencyLimitStrategySpec struct {

	// +kubebuilder:validation:Type=integer
	// +kubebuilder:validation:Format=int64
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Required
	MaxConcurrencyThreshold int64 `json:"maxConcurrency"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Enum=Local;Global
	// +kubebuilder:validation:Required
	LimitMode string `json:"limitMode"`
}

ConcurrencyLimitStrategySpec defines the spec of ConcurrencyLimitStrategy.

func (*ConcurrencyLimitStrategySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConcurrencyLimitStrategySpec.

func (*ConcurrencyLimitStrategySpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConcurrencyLimitStrategyStatus

type ConcurrencyLimitStrategyStatus struct {
}

ConcurrencyLimitStrategyStatus defines the observed state of ConcurrencyLimitStrategy.

func (*ConcurrencyLimitStrategyStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConcurrencyLimitStrategyStatus.

func (*ConcurrencyLimitStrategyStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ErrorConditions

type ErrorConditions struct {
}

func (*ErrorConditions) DeepCopy

func (in *ErrorConditions) DeepCopy() *ErrorConditions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ErrorConditions.

func (*ErrorConditions) DeepCopyInto

func (in *ErrorConditions) DeepCopyInto(out *ErrorConditions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FaultToleranceRule

type FaultToleranceRule struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec FaultToleranceRuleSpec `json:"spec,omitempty"`

	Status FaultToleranceRuleStatus `json:"status,omitempty"`
}

func (*FaultToleranceRule) DeepCopy

func (in *FaultToleranceRule) DeepCopy() *FaultToleranceRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultToleranceRule.

func (*FaultToleranceRule) DeepCopyInto

func (in *FaultToleranceRule) DeepCopyInto(out *FaultToleranceRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FaultToleranceRule) DeepCopyObject

func (in *FaultToleranceRule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FaultToleranceRuleList

type FaultToleranceRuleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []FaultToleranceRule `json:"items"`
}

FaultToleranceRuleList contains a list of FaultToleranceRule.

func (*FaultToleranceRuleList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultToleranceRuleList.

func (*FaultToleranceRuleList) DeepCopyInto

func (in *FaultToleranceRuleList) DeepCopyInto(out *FaultToleranceRuleList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*FaultToleranceRuleList) DeepCopyObject

func (in *FaultToleranceRuleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type FaultToleranceRuleSpec

type FaultToleranceRuleSpec struct {

	// +kubebuilder:validation:Type=array
	// +kubebuilder:validation:Required
	Targets []FaultToleranceTargetRef `json:"targets"`

	// +kubebuilder:validation:Type=array
	// +kubebuilder:validation:Required
	Strategies []FaultToleranceStrategyRef `json:"strategies"`
}

FaultToleranceRuleSpec defines the spec of FaultToleranceRule.

func (*FaultToleranceRuleSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultToleranceRuleSpec.

func (*FaultToleranceRuleSpec) DeepCopyInto

func (in *FaultToleranceRuleSpec) DeepCopyInto(out *FaultToleranceRuleSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FaultToleranceRuleStatus

type FaultToleranceRuleStatus struct {
}

FaultToleranceRuleStatus defines the observed state of FaultToleranceRule.

func (*FaultToleranceRuleStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultToleranceRuleStatus.

func (*FaultToleranceRuleStatus) DeepCopyInto

func (in *FaultToleranceRuleStatus) DeepCopyInto(out *FaultToleranceRuleStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FaultToleranceStrategyRef

type FaultToleranceStrategyRef struct {
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Required
	Name string `json:"name"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum=RateLimitStrategy;ConcurrencyLimitStrategy
	Kind string `json:"kind"`
}

func (*FaultToleranceStrategyRef) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultToleranceStrategyRef.

func (*FaultToleranceStrategyRef) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FaultToleranceTargetRef

type FaultToleranceTargetRef struct {
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:Required
	TargetResourceName string `json:"targetResourceName"`
}

func (*FaultToleranceTargetRef) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultToleranceTargetRef.

func (*FaultToleranceTargetRef) DeepCopyInto

func (in *FaultToleranceTargetRef) DeepCopyInto(out *FaultToleranceTargetRef)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RateLimitStrategy

type RateLimitStrategy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec RateLimitStrategySpec `json:"spec,omitempty"`

	Status RateLimitStrategyStatus `json:"status,omitempty"`
}

func (*RateLimitStrategy) DeepCopy

func (in *RateLimitStrategy) DeepCopy() *RateLimitStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitStrategy.

func (*RateLimitStrategy) DeepCopyInto

func (in *RateLimitStrategy) DeepCopyInto(out *RateLimitStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RateLimitStrategy) DeepCopyObject

func (in *RateLimitStrategy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RateLimitStrategyList

type RateLimitStrategyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RateLimitStrategy `json:"items"`
}

RateLimitStrategyList contains a list of RateLimitStrategy.

func (*RateLimitStrategyList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitStrategyList.

func (*RateLimitStrategyList) DeepCopyInto

func (in *RateLimitStrategyList) DeepCopyInto(out *RateLimitStrategyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RateLimitStrategyList) DeepCopyObject

func (in *RateLimitStrategyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RateLimitStrategySpec

type RateLimitStrategySpec struct {
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Enum=RequestAmount
	// +kubebuilder:validation:Required
	MetricType string `json:"metricType"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Enum=Local;Global
	// +kubebuilder:validation:Required
	LimitMode string `json:"limitMode"`

	// +kubebuilder:validation:Type=integer
	// +kubebuilder:validation:Format=int64
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Required
	Threshold int64 `json:"threshold"`

	// +kubebuilder:validation:Type=integer
	// +kubebuilder:validation:Format=int32
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Required
	StatDurationSeconds int32 `json:"statDurationSeconds"`
}

RateLimitStrategySpec defines the spec of RateLimitStrategy.

func (*RateLimitStrategySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitStrategySpec.

func (*RateLimitStrategySpec) DeepCopyInto

func (in *RateLimitStrategySpec) DeepCopyInto(out *RateLimitStrategySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RateLimitStrategyStatus

type RateLimitStrategyStatus struct {
}

RateLimitStrategyStatus defines the observed state of RateLimitStrategy.

func (*RateLimitStrategyStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitStrategyStatus.

func (*RateLimitStrategyStatus) DeepCopyInto

func (in *RateLimitStrategyStatus) DeepCopyInto(out *RateLimitStrategyStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SlowConditions

type SlowConditions struct {
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^[1-9]\d*(s|ms|m|min|minute|h|d)$
	MaxAllowedRt string `json:"maxAllowedRt"`
}

func (*SlowConditions) DeepCopy

func (in *SlowConditions) DeepCopy() *SlowConditions

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlowConditions.

func (*SlowConditions) DeepCopyInto

func (in *SlowConditions) DeepCopyInto(out *SlowConditions)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThrottlingStrategy

type ThrottlingStrategy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ThrottlingStrategySpec `json:"spec,omitempty"`

	Status ThrottlingStrategyStatus `json:"status,omitempty"`
}

func (*ThrottlingStrategy) DeepCopy

func (in *ThrottlingStrategy) DeepCopy() *ThrottlingStrategy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingStrategy.

func (*ThrottlingStrategy) DeepCopyInto

func (in *ThrottlingStrategy) DeepCopyInto(out *ThrottlingStrategy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThrottlingStrategy) DeepCopyObject

func (in *ThrottlingStrategy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThrottlingStrategyList

type ThrottlingStrategyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ThrottlingStrategy `json:"items"`
}

ThrottlingStrategyList contains a list of ThrottlingStrategy.

func (*ThrottlingStrategyList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingStrategyList.

func (*ThrottlingStrategyList) DeepCopyInto

func (in *ThrottlingStrategyList) DeepCopyInto(out *ThrottlingStrategyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ThrottlingStrategyList) DeepCopyObject

func (in *ThrottlingStrategyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ThrottlingStrategySpec

type ThrottlingStrategySpec struct {
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^\d+(s|ms|m|min|minute|h|d)$
	MinIntervalOfRequests string `json:"minIntervalOfRequests"`

	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern=^[1-9]\d*(s|ms|m|min|minute|h|d)$
	QueueTimeout string `json:"queueTimeout"`
}

ThrottlingStrategySpec defines the spec of ThrottlingStrategy.

func (*ThrottlingStrategySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingStrategySpec.

func (*ThrottlingStrategySpec) DeepCopyInto

func (in *ThrottlingStrategySpec) DeepCopyInto(out *ThrottlingStrategySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ThrottlingStrategyStatus

type ThrottlingStrategyStatus struct {
}

ThrottlingStrategyStatus defines the observed state of ThrottlingStrategy.

func (*ThrottlingStrategyStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThrottlingStrategyStatus.

func (*ThrottlingStrategyStatus) DeepCopyInto

func (in *ThrottlingStrategyStatus) DeepCopyInto(out *ThrottlingStrategyStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis
Package v1alpha1 contains API Schema definitions for the OpenSergo traffic-router v1alpha1 CRD.
Package v1alpha1 contains API Schema definitions for the OpenSergo traffic-router v1alpha1 CRD.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL