Documentation ¶
Overview ¶
+k8s:protobuf-gen=package +groupName=ctrlmesh.kusionstack.io
Package v1alpha1 contains API Schema definitions for the ctrlmesh v1alpha1 API group +kubebuilder:object:generate=true +groupName=ctrlmesh.kusionstack.io
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type AutoConfig
- type BreakerState
- type Bucket
- type CanaryConfig
- type CircuitBreaker
- type CircuitBreakerList
- type CircuitBreakerSpec
- type CircuitBreakerStatus
- type ContentType
- type EffectiveTimeRange
- type FaultInjection
- type FaultInjectionList
- type FaultInjectionSpec
- type FaultInjectionState
- type FaultInjectionStatus
- type FaultInjectionTargetStatus
- type HTTPFaultInjection
- type HTTPFaultInjectionAbort
- type HTTPFaultInjectionDelay
- type HttpHeader
- type HttpMatch
- type InterceptType
- type Limiting
- type LimitingSnapshot
- type ManagerState
- type ManagerStateEndpoint
- type ManagerStateEndpoints
- type ManagerStateList
- type ManagerStatePorts
- type ManagerStateSpec
- type ManagerStateStatus
- type ManualConfig
- type Match
- type MatchContent
- type ObjectLimiter
- type RecoverPolicy
- type RecoverType
- type ResourceGroup
- type ResourceMatch
- type ResourceRule
- type RestRule
- type RootStatus
- type ShardingConfig
- type ShardingConfigControllerConfiguration
- type ShardingConfigList
- type ShardingConfigRestConfigOverrides
- type ShardingConfigRoot
- type ShardingConfigSpec
- type ShardingConfigStatus
- type ShardingConfigWebhookConfiguration
- type StringMatchType
- type TargetStatus
- type TrafficInterceptRule
- type TriggerPolicy
Constants ¶
const ( ShardingConfigInjectedKey = "ctrlmesh.kusionstack.io/sharding-config-injected" SignalAll = "*" )
const (
NameOfManager = "ctrlmesh-manager"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "ctrlmesh.kusionstack.io", Version: "v1alpha1"} SchemeGroupVersion = GroupVersion // 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 ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource is required by pkg/client/listers/...
Types ¶
type AutoConfig ¶
type AutoConfig struct { ShardingSize int `json:"shardingSize"` EveryShardReplicas int `json:"everyShardReplicas"` }
func (*AutoConfig) DeepCopy ¶
func (in *AutoConfig) DeepCopy() *AutoConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AutoConfig.
func (*AutoConfig) DeepCopyInto ¶
func (in *AutoConfig) DeepCopyInto(out *AutoConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BreakerState ¶
type BreakerState string
BreakerState is the status of the circuit breaker, which may be 'Opened' or 'Closed'.
var ( BreakerStatusOpened BreakerState = "Opened" BreakerStatusClosed BreakerState = "Closed" )
type Bucket ¶
type Bucket struct { // Burst is the max token number of the bucket Burst uint32 `json:"burst"` // Interval is the time interval of the limiting policy, in format of time like: 1h, 3m, 5s. Interval string `json:"interval"` // Limit is the token number of the limiting policy. Limit uint32 `json:"limit"` }
Bucket defines the whole token bucket of the policy
func (*Bucket) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bucket.
func (*Bucket) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CanaryConfig ¶
type CanaryConfig struct { Replicas *int `json:"replicas"` InNamespaces []string `json:"inNamespaces,omitempty"` InShardHash []string `json:"inShardHash,omitempty"` }
func (*CanaryConfig) DeepCopy ¶
func (in *CanaryConfig) DeepCopy() *CanaryConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CanaryConfig.
func (*CanaryConfig) DeepCopyInto ¶
func (in *CanaryConfig) DeepCopyInto(out *CanaryConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CircuitBreaker ¶
type CircuitBreaker struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec CircuitBreakerSpec `json:"spec,omitempty"` Status CircuitBreakerStatus `json:"status,omitempty"` }
CircuitBreaker is the Schema for the circuitbreakers API
func (*CircuitBreaker) DeepCopy ¶
func (in *CircuitBreaker) DeepCopy() *CircuitBreaker
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreaker.
func (*CircuitBreaker) DeepCopyInto ¶
func (in *CircuitBreaker) DeepCopyInto(out *CircuitBreaker)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CircuitBreaker) DeepCopyObject ¶
func (in *CircuitBreaker) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CircuitBreakerList ¶
type CircuitBreakerList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []CircuitBreaker `json:"items"` }
CircuitBreakerList contains a list of CircuitBreaker
func (*CircuitBreakerList) DeepCopy ¶
func (in *CircuitBreakerList) DeepCopy() *CircuitBreakerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakerList.
func (*CircuitBreakerList) DeepCopyInto ¶
func (in *CircuitBreakerList) DeepCopyInto(out *CircuitBreakerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CircuitBreakerList) DeepCopyObject ¶
func (in *CircuitBreakerList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CircuitBreakerSpec ¶
type CircuitBreakerSpec struct { // Selector is a label query over pods of this application. Selector *metav1.LabelSelector `json:"selector"` // RateLimitings defines the limit policies RateLimitings []*Limiting `json:"rateLimitings,omitempty"` // TrafficInterceptRules defines the traffic rules TrafficInterceptRules []*TrafficInterceptRule `json:"trafficInterceptRules,omitempty"` }
CircuitBreakerSpec defines the desired state of CircuitBreaker
func (*CircuitBreakerSpec) DeepCopy ¶
func (in *CircuitBreakerSpec) DeepCopy() *CircuitBreakerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakerSpec.
func (*CircuitBreakerSpec) DeepCopyInto ¶
func (in *CircuitBreakerSpec) DeepCopyInto(out *CircuitBreakerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CircuitBreakerStatus ¶
type CircuitBreakerStatus struct { ObservedGeneration int64 `json:"observedGeneration,omitempty"` LastUpdatedTime *metav1.Time `json:"lastUpdatedTime,omitempty"` CurrentSpecHash string `json:"currentSpecHash,omitempty"` TargetStatus []*TargetStatus `json:"targetStatus,omitempty"` }
CircuitBreakerStatus defines the observed state of CircuitBreaker
func (*CircuitBreakerStatus) DeepCopy ¶
func (in *CircuitBreakerStatus) DeepCopy() *CircuitBreakerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CircuitBreakerStatus.
func (*CircuitBreakerStatus) DeepCopyInto ¶
func (in *CircuitBreakerStatus) DeepCopyInto(out *CircuitBreakerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ContentType ¶
type ContentType string
ContentType defines how the circuit-breaking traffic intercept content type from 'Normal' to 'Regexp'
const ( ContentTypeNormal ContentType = "Normal" ContentTypeRegexp ContentType = "Regexp" )
type EffectiveTimeRange ¶ added in v0.2.0
type EffectiveTimeRange struct { // StartTime is the starting time of fault injection. StartTime string `json:"startTime,omitempty"` // EndTime is the ending time of fault injection. EndTime string `json:"endTime,omitempty"` // DaysOfWeek specifies on which days of the week the fault injection configuration is effective. // 0 represents Sunday, 1 represents Monday, and so on. DaysOfWeek []int `json:"daysOfWeek,omitempty"` // DaysOfMonth specifies on which days of the month the fault injection configuration is effective. // For example, 1 represents the first day of the month, and so on. DaysOfMonth []int `json:"daysOfMonth,omitempty"` // Months specifies in which months of the year the fault injection configuration is effective. // 1 represents January, 2 represents February, and so on. Months []int `json:"months,omitempty"` }
func (*EffectiveTimeRange) DeepCopy ¶ added in v0.2.0
func (in *EffectiveTimeRange) DeepCopy() *EffectiveTimeRange
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EffectiveTimeRange.
func (*EffectiveTimeRange) DeepCopyInto ¶ added in v0.2.0
func (in *EffectiveTimeRange) DeepCopyInto(out *EffectiveTimeRange)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FaultInjection ¶ added in v0.2.0
type FaultInjection struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec FaultInjectionSpec `json:"spec,omitempty"` Status FaultInjectionStatus `json:"status,omitempty"` }
func (*FaultInjection) DeepCopy ¶ added in v0.2.0
func (in *FaultInjection) DeepCopy() *FaultInjection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultInjection.
func (*FaultInjection) DeepCopyInto ¶ added in v0.2.0
func (in *FaultInjection) DeepCopyInto(out *FaultInjection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FaultInjection) DeepCopyObject ¶ added in v0.2.0
func (in *FaultInjection) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FaultInjectionList ¶ added in v0.2.0
type FaultInjectionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []FaultInjection `json:"items"` }
FaultInjectionList contains a list of FaultInjection
func (*FaultInjectionList) DeepCopy ¶ added in v0.2.0
func (in *FaultInjectionList) DeepCopy() *FaultInjectionList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultInjectionList.
func (*FaultInjectionList) DeepCopyInto ¶ added in v0.2.0
func (in *FaultInjectionList) DeepCopyInto(out *FaultInjectionList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*FaultInjectionList) DeepCopyObject ¶ added in v0.2.0
func (in *FaultInjectionList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type FaultInjectionSpec ¶ added in v0.2.0
type FaultInjectionSpec struct { // Selector is a label query over pods of this configuration. Selector *metav1.LabelSelector `json:"selector,omitempty"` Disabled bool `json:"disabled,omitempty"` HTTPFaultInjections []*HTTPFaultInjection `json:"httpFault,omitempty"` }
func (*FaultInjectionSpec) DeepCopy ¶ added in v0.2.0
func (in *FaultInjectionSpec) DeepCopy() *FaultInjectionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultInjectionSpec.
func (*FaultInjectionSpec) DeepCopyInto ¶ added in v0.2.0
func (in *FaultInjectionSpec) DeepCopyInto(out *FaultInjectionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FaultInjectionState ¶ added in v0.2.0
type FaultInjectionState string
FaultInjectionState is the status of the fault injection, which may be 'Opened' or 'Closed'.
type FaultInjectionStatus ¶ added in v0.2.0
type FaultInjectionStatus struct { ObservedGeneration int64 `json:"observedGeneration,omitempty"` LastUpdatedTime *metav1.Time `json:"lastUpdatedTime,omitempty"` CurrentSpecHash string `json:"currentSpecHash,omitempty"` TargetStatus []*FaultInjectionTargetStatus `json:"targetStatus,omitempty"` }
func (*FaultInjectionStatus) DeepCopy ¶ added in v0.2.0
func (in *FaultInjectionStatus) DeepCopy() *FaultInjectionStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultInjectionStatus.
func (*FaultInjectionStatus) DeepCopyInto ¶ added in v0.2.0
func (in *FaultInjectionStatus) DeepCopyInto(out *FaultInjectionStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type FaultInjectionTargetStatus ¶ added in v0.2.0
type FaultInjectionTargetStatus struct { PodName string `json:"podName,omitempty"` PodIP string `json:"podIP,omitempty"` ConfigHash string `json:"configHash,omitempty"` Message string `json:"message,omitempty"` }
func (*FaultInjectionTargetStatus) DeepCopy ¶ added in v0.2.0
func (in *FaultInjectionTargetStatus) DeepCopy() *FaultInjectionTargetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FaultInjectionTargetStatus.
func (*FaultInjectionTargetStatus) DeepCopyInto ¶ added in v0.2.0
func (in *FaultInjectionTargetStatus) DeepCopyInto(out *FaultInjectionTargetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPFaultInjection ¶ added in v0.2.0
type HTTPFaultInjection struct { // Name is the name of the policy Name string `json:"name,omitempty"` // Delay requests before forwarding, emulating various failures such as // network issues, overloaded upstream service, etc. Delay *HTTPFaultInjectionDelay `json:"delay,omitempty"` // Abort Http request attempts and return error codes back to downstream // service, giving the impression that the upstream service is faulty. Abort *HTTPFaultInjectionAbort `json:"abort,omitempty"` // Match specifies a set of criterion to be met in order for the // rule to be applied to the HTTP request. Match *Match `json:"match,omitempty"` // Effective time of fault injection EffectiveTime *EffectiveTimeRange `json:"effectiveTime,omitempty"` }
HTTPFaultInjection can be used to specify one or more faults to inject while forwarding HTTP requests to the destination specified in a route.
func (*HTTPFaultInjection) DeepCopy ¶ added in v0.2.0
func (in *HTTPFaultInjection) DeepCopy() *HTTPFaultInjection
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPFaultInjection.
func (*HTTPFaultInjection) DeepCopyInto ¶ added in v0.2.0
func (in *HTTPFaultInjection) DeepCopyInto(out *HTTPFaultInjection)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPFaultInjectionAbort ¶ added in v0.2.0
type HTTPFaultInjectionAbort struct { // HttpStatus is used to indicate the HTTP status code to // return to the caller. HttpStatus int `json:"httpStatus,omitempty"` // Percent of requests to be aborted with the error code provided. // If not specified, no request will be aborted. Percent string `json:"percent,omitempty"` }
func (*HTTPFaultInjectionAbort) DeepCopy ¶ added in v0.2.0
func (in *HTTPFaultInjectionAbort) DeepCopy() *HTTPFaultInjectionAbort
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPFaultInjectionAbort.
func (*HTTPFaultInjectionAbort) DeepCopyInto ¶ added in v0.2.0
func (in *HTTPFaultInjectionAbort) DeepCopyInto(out *HTTPFaultInjectionAbort)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPFaultInjectionDelay ¶ added in v0.2.0
type HTTPFaultInjectionDelay struct { // FixedDelay is used to indicate the amount of delay in seconds. FixedDelay string `json:"fixedDelay,omitempty"` // Percent of requests on which the delay will be injected. // If left unspecified, no request will be delayed Percent string `json:"percent,omitempty"` }
func (*HTTPFaultInjectionDelay) DeepCopy ¶ added in v0.2.0
func (in *HTTPFaultInjectionDelay) DeepCopy() *HTTPFaultInjectionDelay
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPFaultInjectionDelay.
func (*HTTPFaultInjectionDelay) DeepCopyInto ¶ added in v0.2.0
func (in *HTTPFaultInjectionDelay) DeepCopyInto(out *HTTPFaultInjectionDelay)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HttpHeader ¶ added in v0.2.0
func (*HttpHeader) DeepCopy ¶ added in v0.2.0
func (in *HttpHeader) DeepCopy() *HttpHeader
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HttpHeader.
func (*HttpHeader) DeepCopyInto ¶ added in v0.2.0
func (in *HttpHeader) DeepCopyInto(out *HttpHeader)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HttpMatch ¶ added in v0.2.0
type HttpMatch struct { Host *MatchContent `json:"host,omitempty"` Path *MatchContent `json:"path,omitempty"` Method string `json:"method,omitempty"` //TODO: header match Headers []*HttpHeader `json:"headers,omitempty"` }
HttpMatch specifies the criteria for matching HTTP requests to RESTful resources as part of HTTP FaultInjection. Each rule can target one or more URLs and HTTP methods.
func (*HttpMatch) DeepCopy ¶ added in v0.2.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HttpMatch.
func (*HttpMatch) DeepCopyInto ¶ added in v0.2.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type InterceptType ¶
type InterceptType string
InterceptType defines how the circuit-breaking traffic intercept from 'White' to 'Black'
const ( InterceptTypeWhitelist InterceptType = "Whitelist" InterceptTypeBlacklist InterceptType = "Blacklist" )
type Limiting ¶
type Limiting struct { // Name is the name of the policy Name string `json:"name"` // ResourceRules defines the target k8s resource of the limiting policy ResourceRules []ResourceRule `json:"resourceRules,omitempty"` // RestRules defines the target rest resource of the limiting policy RestRules []RestRule `json:"restRules,omitempty"` // Bucket defines the whole token bucket of the policy Bucket Bucket `json:"bucket"` // TriggerPolicy defines how the circuit-breaking policy triggered from 'Closed' to 'Opened' TriggerPolicy TriggerPolicy `json:"triggerPolicy"` // RecoverPolicy defines how the circuit-breaking policy recovered from 'Opened' to 'Closed' RecoverPolicy *RecoverPolicy `json:"recoverPolicy,omitempty"` // ValidatePolicy determine the opportunity to validate req //ValidatePolicy ValidatePolicy `json:"validatePolicy,omitempty"` // Properties defines the additional properties of the policy, like: SleepingWindowSize Properties map[string]string `json:"properties,omitempty"` }
Limiting defines the limit policy
func (*Limiting) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Limiting.
func (*Limiting) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LimitingSnapshot ¶
type LimitingSnapshot struct { // Name specifies the name of the policy Name string `json:"name"` // Status is the status of the circuit breaker, which may be 'Opened' or 'Closed'. State BreakerState `json:"state"` // LastTransitionTime is the last time that the status changed LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` }
LimitingSnapshot defines the snapshot of the whole limiting policy
func (*LimitingSnapshot) DeepCopy ¶
func (in *LimitingSnapshot) DeepCopy() *LimitingSnapshot
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitingSnapshot.
func (*LimitingSnapshot) DeepCopyInto ¶
func (in *LimitingSnapshot) DeepCopyInto(out *LimitingSnapshot)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagerState ¶
type ManagerState struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ManagerStateSpec `json:"spec,omitempty"` Status ManagerStateStatus `json:"status,omitempty"` }
ManagerState is the Schema for the managerstates API
func (*ManagerState) DeepCopy ¶
func (in *ManagerState) DeepCopy() *ManagerState
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerState.
func (*ManagerState) DeepCopyInto ¶
func (in *ManagerState) DeepCopyInto(out *ManagerState)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ManagerState) DeepCopyObject ¶
func (in *ManagerState) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ManagerStateEndpoint ¶
type ManagerStateEndpoint struct { Name string `json:"name"` PodIP string `json:"podIP"` Leader bool `json:"leader"` }
func (*ManagerStateEndpoint) DeepCopy ¶
func (in *ManagerStateEndpoint) DeepCopy() *ManagerStateEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerStateEndpoint.
func (*ManagerStateEndpoint) DeepCopyInto ¶
func (in *ManagerStateEndpoint) DeepCopyInto(out *ManagerStateEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagerStateEndpoints ¶
type ManagerStateEndpoints []ManagerStateEndpoint
func (ManagerStateEndpoints) DeepCopy ¶
func (in ManagerStateEndpoints) DeepCopy() ManagerStateEndpoints
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerStateEndpoints.
func (ManagerStateEndpoints) DeepCopyInto ¶
func (in ManagerStateEndpoints) DeepCopyInto(out *ManagerStateEndpoints)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ManagerStateEndpoints) Len ¶
func (e ManagerStateEndpoints) Len() int
func (ManagerStateEndpoints) Less ¶
func (e ManagerStateEndpoints) Less(i, j int) bool
func (ManagerStateEndpoints) Swap ¶
func (e ManagerStateEndpoints) Swap(i, j int)
type ManagerStateList ¶
type ManagerStateList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ManagerState `json:"items"` }
ManagerStateList contains a list of ManagerState
func (*ManagerStateList) DeepCopy ¶
func (in *ManagerStateList) DeepCopy() *ManagerStateList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerStateList.
func (*ManagerStateList) DeepCopyInto ¶
func (in *ManagerStateList) DeepCopyInto(out *ManagerStateList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ManagerStateList) DeepCopyObject ¶
func (in *ManagerStateList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ManagerStatePorts ¶
type ManagerStatePorts struct { GrpcLeaderElectionPort int `json:"grpcLeaderElectionPort,omitempty"` GrpcNonLeaderElectionPort int `json:"grpcNonLeaderElectionPort,omitempty"` }
func (*ManagerStatePorts) DeepCopy ¶
func (in *ManagerStatePorts) DeepCopy() *ManagerStatePorts
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerStatePorts.
func (*ManagerStatePorts) DeepCopyInto ¶
func (in *ManagerStatePorts) DeepCopyInto(out *ManagerStatePorts)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagerStateSpec ¶
type ManagerStateSpec struct { }
ManagerStateSpec defines the desired state of ManagerState
func (*ManagerStateSpec) DeepCopy ¶
func (in *ManagerStateSpec) DeepCopy() *ManagerStateSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerStateSpec.
func (*ManagerStateSpec) DeepCopyInto ¶
func (in *ManagerStateSpec) DeepCopyInto(out *ManagerStateSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagerStateStatus ¶
type ManagerStateStatus struct { Namespace string `json:"namespace,omitempty"` Endpoints ManagerStateEndpoints `json:"endpoints,omitempty"` Ports *ManagerStatePorts `json:"ports,omitempty"` UpdateTimestamp *metav1.Time `json:"updateTimestamp,omitempty"` }
ManagerStateStatus defines the observed state of ManagerState
func (*ManagerStateStatus) DeepCopy ¶
func (in *ManagerStateStatus) DeepCopy() *ManagerStateStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagerStateStatus.
func (*ManagerStateStatus) DeepCopyInto ¶
func (in *ManagerStateStatus) DeepCopyInto(out *ManagerStateStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManualConfig ¶
func (*ManualConfig) DeepCopy ¶
func (in *ManualConfig) DeepCopy() *ManualConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManualConfig.
func (*ManualConfig) DeepCopyInto ¶
func (in *ManualConfig) DeepCopyInto(out *ManualConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Match ¶ added in v0.2.0
type Match struct { Resources []*ResourceMatch `json:"resources,omitempty"` HttpMatch []*HttpMatch `json:"httpMatch,omitempty"` }
Match defines a set of rules and criteria for matching incoming HTTP requests. It associates a name with the set of criteria and can relate to additional resources that are relevant to the request matching, enabling complex and granular control over request matching in HTTP FaultInjection.
func (*Match) DeepCopy ¶ added in v0.2.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match.
func (*Match) DeepCopyInto ¶ added in v0.2.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MatchContent ¶ added in v0.2.0
type MatchContent struct { Exact string `json:"exact,omitempty"` Regex string `json:"regex,omitempty"` }
func (*MatchContent) DeepCopy ¶ added in v0.2.0
func (in *MatchContent) DeepCopy() *MatchContent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchContent.
func (*MatchContent) DeepCopyInto ¶ added in v0.2.0
func (in *MatchContent) DeepCopyInto(out *MatchContent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObjectLimiter ¶
type ObjectLimiter struct { RelatedResources []ResourceGroup `json:"relateResources,omitempty"` Selector *metav1.LabelSelector `json:"selector,omitempty"` }
func (*ObjectLimiter) DeepCopy ¶
func (in *ObjectLimiter) DeepCopy() *ObjectLimiter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectLimiter.
func (*ObjectLimiter) DeepCopyInto ¶
func (in *ObjectLimiter) DeepCopyInto(out *ObjectLimiter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecoverPolicy ¶
type RecoverPolicy struct { RecoverType RecoverType `json:"type"` SleepingWindowSize *string `json:"sleepingWindowSize,omitempty"` }
RecoverPolicy defines how the circuit-breaking policy recovered from 'Opened' to 'Closed'
func (*RecoverPolicy) DeepCopy ¶
func (in *RecoverPolicy) DeepCopy() *RecoverPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecoverPolicy.
func (*RecoverPolicy) DeepCopyInto ¶
func (in *RecoverPolicy) DeepCopyInto(out *RecoverPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RecoverType ¶
type RecoverType string
const ( RecoverPolicyManual RecoverType = "Manual" RecoverPolicySleepingWindow RecoverType = "SleepingWindow" )
type ResourceGroup ¶
type ResourceGroup struct { Resources []string `json:"resources,omitempty"` APIGroups []string `json:"apiGroups,omitempty"` }
func (*ResourceGroup) DeepCopy ¶
func (in *ResourceGroup) DeepCopy() *ResourceGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceGroup.
func (*ResourceGroup) DeepCopyInto ¶
func (in *ResourceGroup) DeepCopyInto(out *ResourceGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceMatch ¶ added in v0.2.0
type ResourceMatch struct { ApiGroups []string `json:"apiGroups,omitempty"` Namespaces []string `json:"namespaces,omitempty"` Resources []string `json:"resources,omitempty"` Verbs []string `json:"verbs,omitempty"` }
func (*ResourceMatch) DeepCopy ¶ added in v0.2.0
func (in *ResourceMatch) DeepCopy() *ResourceMatch
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceMatch.
func (*ResourceMatch) DeepCopyInto ¶ added in v0.2.0
func (in *ResourceMatch) DeepCopyInto(out *ResourceMatch)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ResourceRule ¶
type ResourceRule struct { // APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of // the enumerated resources in any API group will be allowed. "*" means all. ApiGroups []string `json:"apiGroups"` // Resources is a list of resources this rule applies to. "*" means all in the specified apiGroups. // "*/foo" represents the subresource 'foo' for all resources in the specified apiGroups. Resources []string `json:"resources"` // Verb is a list of kubernetes resource API verbs, like: get, list, watch, create, update, delete, proxy. "*" means all. Verbs []string `json:"verbs"` // Namespaces is a list of namespaces the rule applies to. "*" means all. Namespaces []string `json:"namespaces"` }
ResourceRule defines the target k8s resource of the limiting policy
func (*ResourceRule) DeepCopy ¶
func (in *ResourceRule) DeepCopy() *ResourceRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRule.
func (*ResourceRule) DeepCopyInto ¶
func (in *ResourceRule) DeepCopyInto(out *ResourceRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RestRule ¶
type RestRule struct { // URL gives the location of the rest request, in standard URL form (`scheme://host:port/path`) URL string `json:"url"` // Method specifies the http method of the request, like: PUT, POST, GET, DELETE. Method string `json:"method"` }
RestRule defines the target rest resource of the limiting policy
func (*RestRule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestRule.
func (*RestRule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RootStatus ¶
type RootStatus struct {
Child []string `json:"childShardingConfigs,omitempty"`
}
func (*RootStatus) DeepCopy ¶
func (in *RootStatus) DeepCopy() *RootStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootStatus.
func (*RootStatus) DeepCopyInto ¶
func (in *RootStatus) DeepCopyInto(out *RootStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShardingConfig ¶
type ShardingConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ShardingConfigSpec `json:"spec,omitempty"` Status ShardingConfigStatus `json:"status,omitempty"` }
ShardingConfig is the Schema for the ShardingConfigs API
func (*ShardingConfig) DeepCopy ¶
func (in *ShardingConfig) DeepCopy() *ShardingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfig.
func (*ShardingConfig) DeepCopyInto ¶
func (in *ShardingConfig) DeepCopyInto(out *ShardingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ShardingConfig) DeepCopyObject ¶
func (in *ShardingConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ShardingConfigControllerConfiguration ¶
type ShardingConfigControllerConfiguration struct {
LeaderElectionName string `json:"leaderElectionName"`
}
ShardingConfigControllerConfiguration defines the configuration of controller in this application.
func (*ShardingConfigControllerConfiguration) DeepCopy ¶
func (in *ShardingConfigControllerConfiguration) DeepCopy() *ShardingConfigControllerConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfigControllerConfiguration.
func (*ShardingConfigControllerConfiguration) DeepCopyInto ¶
func (in *ShardingConfigControllerConfiguration) DeepCopyInto(out *ShardingConfigControllerConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShardingConfigList ¶
type ShardingConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ShardingConfig `json:"items"` }
ShardingConfigList contains a list of ShardingConfig
func (*ShardingConfigList) DeepCopy ¶
func (in *ShardingConfigList) DeepCopy() *ShardingConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfigList.
func (*ShardingConfigList) DeepCopyInto ¶
func (in *ShardingConfigList) DeepCopyInto(out *ShardingConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ShardingConfigList) DeepCopyObject ¶
func (in *ShardingConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ShardingConfigRestConfigOverrides ¶
type ShardingConfigRestConfigOverrides struct { // UserAgentOrPrefix can override the UserAgent of application. // If it ends with '/', we consider it as prefix and will be add to the front of original UserAgent. // Otherwise it will replace the original UserAgent. UserAgentOrPrefix *string `json:"userAgentOrPrefix,omitempty"` }
ShardingConfigRestConfigOverrides defines overrides to the application's rest config.
func (*ShardingConfigRestConfigOverrides) DeepCopy ¶
func (in *ShardingConfigRestConfigOverrides) DeepCopy() *ShardingConfigRestConfigOverrides
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfigRestConfigOverrides.
func (*ShardingConfigRestConfigOverrides) DeepCopyInto ¶
func (in *ShardingConfigRestConfigOverrides) DeepCopyInto(out *ShardingConfigRestConfigOverrides)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShardingConfigRoot ¶
type ShardingConfigRoot struct { Disable *bool `json:"disable,omitempty"` Prefix string `json:"prefix"` TargetStatefulSet string `json:"targetStatefulSet"` // Canary is canary shard config Canary *CanaryConfig `json:"canary,omitempty"` // Auto is config to automatically generate child ShardingConfig Auto *AutoConfig `json:"auto,omitempty"` ResourceSelector []ObjectLimiter `json:"resourceSelector,omitempty"` }
func (*ShardingConfigRoot) DeepCopy ¶
func (in *ShardingConfigRoot) DeepCopy() *ShardingConfigRoot
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfigRoot.
func (*ShardingConfigRoot) DeepCopyInto ¶
func (in *ShardingConfigRoot) DeepCopyInto(out *ShardingConfigRoot)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShardingConfigSpec ¶
type ShardingConfigSpec struct { // Selector is a label query over pods of this configuration. Selector *metav1.LabelSelector `json:"selector,omitempty"` Controller *ShardingConfigControllerConfiguration `json:"controller,omitempty"` Webhook *ShardingConfigWebhookConfiguration `json:"webhook,omitempty"` Limits []ObjectLimiter `json:"limits,omitempty"` Root *ShardingConfigRoot `json:"root,omitempty"` }
ShardingConfigSpec defines the desired state of ShardingConfig
func (*ShardingConfigSpec) DeepCopy ¶
func (in *ShardingConfigSpec) DeepCopy() *ShardingConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfigSpec.
func (*ShardingConfigSpec) DeepCopyInto ¶
func (in *ShardingConfigSpec) DeepCopyInto(out *ShardingConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShardingConfigStatus ¶
type ShardingConfigStatus struct {
Root RootStatus `json:"root,omitempty"`
}
ShardingConfigStatus defines the observed state of ShardingConfig
func (*ShardingConfigStatus) DeepCopy ¶
func (in *ShardingConfigStatus) DeepCopy() *ShardingConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfigStatus.
func (*ShardingConfigStatus) DeepCopyInto ¶
func (in *ShardingConfigStatus) DeepCopyInto(out *ShardingConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShardingConfigWebhookConfiguration ¶
type ShardingConfigWebhookConfiguration struct { CertDir string `json:"certDir"` Port int `json:"port"` }
ShardingConfigWebhookConfiguration defines the configuration of webhook in this application.
func (*ShardingConfigWebhookConfiguration) DeepCopy ¶
func (in *ShardingConfigWebhookConfiguration) DeepCopy() *ShardingConfigWebhookConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardingConfigWebhookConfiguration.
func (*ShardingConfigWebhookConfiguration) DeepCopyInto ¶
func (in *ShardingConfigWebhookConfiguration) DeepCopyInto(out *ShardingConfigWebhookConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StringMatchType ¶ added in v0.2.0
type StringMatchType string
type TargetStatus ¶
type TargetStatus struct { PodName string `json:"podName,omitempty"` PodIP string `json:"podIP,omitempty"` ConfigHash string `json:"configHash,omitempty"` Message string `json:"message,omitempty"` LimitingSnapshots []*LimitingSnapshot `json:"limitingSnapshots,omitempty"` }
func (*TargetStatus) DeepCopy ¶
func (in *TargetStatus) DeepCopy() *TargetStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatus.
func (*TargetStatus) DeepCopyInto ¶
func (in *TargetStatus) DeepCopyInto(out *TargetStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TrafficInterceptRule ¶
type TrafficInterceptRule struct { // Name is the name of the traffic rule Name string `json:"name"` // InterceptType is the intercept type of the traffic rule InterceptType InterceptType `json:"interceptType"` // ContentType is the content type of the traffic rule ContentType ContentType `json:"contentType"` // Content is the content of the traffic rule Contents []string `json:"contents"` // Method specifies the http method of the request, like: PUT, POST, GET, DELETE. Methods []string `json:"methods"` }
TrafficInterceptRule defines the traffic intercept rule
func (*TrafficInterceptRule) DeepCopy ¶
func (in *TrafficInterceptRule) DeepCopy() *TrafficInterceptRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrafficInterceptRule.
func (*TrafficInterceptRule) DeepCopyInto ¶
func (in *TrafficInterceptRule) DeepCopyInto(out *TrafficInterceptRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TriggerPolicy ¶
type TriggerPolicy string
TriggerPolicy defines how the circuit-breaking policy triggered from 'Closed' to 'Opened'
const ( TriggerPolicyNormal TriggerPolicy = "Normal" TriggerPolicyLimiterOnly TriggerPolicy = "LimiterOnly" TriggerPolicyForceOpened TriggerPolicy = "ForceOpened" TriggerPolicyForceClosed TriggerPolicy = "ForceClosed" )