circuitbreakerv1

package
v0.1.38 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_middleware_circuitbreaker_v1_circuitbreaker_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BackupService

type BackupService struct {
	Endpoint *v1.Endpoint `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	// contains filtered or unexported fields
}

func (*BackupService) Descriptor deprecated

func (*BackupService) Descriptor() ([]byte, []int)

Deprecated: Use BackupService.ProtoReflect.Descriptor instead.

func (*BackupService) GetEndpoint

func (x *BackupService) GetEndpoint() *v1.Endpoint

func (*BackupService) ProtoMessage

func (*BackupService) ProtoMessage()

func (*BackupService) ProtoReflect

func (x *BackupService) ProtoReflect() protoreflect.Message

func (*BackupService) Reset

func (x *BackupService) Reset()

func (*BackupService) String

func (x *BackupService) String() string

func (*BackupService) Validate

func (m *BackupService) Validate() error

Validate checks the field values on BackupService with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*BackupService) ValidateAll

func (m *BackupService) ValidateAll() error

ValidateAll checks the field values on BackupService with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BackupServiceMultiError, or nil if none found.

type BackupServiceMultiError

type BackupServiceMultiError []error

BackupServiceMultiError is an error wrapping multiple validation errors returned by BackupService.ValidateAll() if the designated constraints aren't met.

func (BackupServiceMultiError) AllErrors

func (m BackupServiceMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (BackupServiceMultiError) Error

func (m BackupServiceMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type BackupServiceValidationError

type BackupServiceValidationError struct {
	// contains filtered or unexported fields
}

BackupServiceValidationError is the validation error returned by BackupService.Validate if the designated constraints aren't met.

func (BackupServiceValidationError) Cause

Cause function returns cause value.

func (BackupServiceValidationError) Error

Error satisfies the builtin error interface

func (BackupServiceValidationError) ErrorName

func (e BackupServiceValidationError) ErrorName() string

ErrorName returns error name.

func (BackupServiceValidationError) Field

Field function returns field value.

func (BackupServiceValidationError) Key

Key function returns key value.

func (BackupServiceValidationError) Reason

Reason function returns reason value.

type CircuitBreaker

type CircuitBreaker struct {

	// Types that are assignable to Trigger:
	//
	//	*CircuitBreaker_SuccessRatio
	//	*CircuitBreaker_Ratio
	Trigger isCircuitBreaker_Trigger `protobuf_oneof:"trigger"`
	// Types that are assignable to Action:
	//
	//	*CircuitBreaker_ResponseData
	//	*CircuitBreaker_BackupService
	Action          isCircuitBreaker_Action `protobuf_oneof:"action"`
	AssertCondtions []*v1.Condition         `protobuf:"bytes,5,rep,name=assert_condtions,json=assertCondtions,proto3" json:"assert_condtions,omitempty"`
	// contains filtered or unexported fields
}

CircuitBreaker middleware config.

func (*CircuitBreaker) Descriptor deprecated

func (*CircuitBreaker) Descriptor() ([]byte, []int)

Deprecated: Use CircuitBreaker.ProtoReflect.Descriptor instead.

func (*CircuitBreaker) GetAction

func (m *CircuitBreaker) GetAction() isCircuitBreaker_Action

func (*CircuitBreaker) GetAssertCondtions

func (x *CircuitBreaker) GetAssertCondtions() []*v1.Condition

func (*CircuitBreaker) GetBackupService

func (x *CircuitBreaker) GetBackupService() *BackupService

func (*CircuitBreaker) GetRatio

func (x *CircuitBreaker) GetRatio() int64

func (*CircuitBreaker) GetResponseData

func (x *CircuitBreaker) GetResponseData() *ResponseData

func (*CircuitBreaker) GetSuccessRatio

func (x *CircuitBreaker) GetSuccessRatio() *SuccessRatio

func (*CircuitBreaker) GetTrigger

func (m *CircuitBreaker) GetTrigger() isCircuitBreaker_Trigger

func (*CircuitBreaker) ProtoMessage

func (*CircuitBreaker) ProtoMessage()

func (*CircuitBreaker) ProtoReflect

func (x *CircuitBreaker) ProtoReflect() protoreflect.Message

func (*CircuitBreaker) Reset

func (x *CircuitBreaker) Reset()

func (*CircuitBreaker) String

func (x *CircuitBreaker) String() string

func (*CircuitBreaker) Validate

func (m *CircuitBreaker) Validate() error

Validate checks the field values on CircuitBreaker with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*CircuitBreaker) ValidateAll

func (m *CircuitBreaker) ValidateAll() error

ValidateAll checks the field values on CircuitBreaker with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in CircuitBreakerMultiError, or nil if none found.

type CircuitBreakerMultiError

type CircuitBreakerMultiError []error

CircuitBreakerMultiError is an error wrapping multiple validation errors returned by CircuitBreaker.ValidateAll() if the designated constraints aren't met.

func (CircuitBreakerMultiError) AllErrors

func (m CircuitBreakerMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CircuitBreakerMultiError) Error

func (m CircuitBreakerMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type CircuitBreakerValidationError

type CircuitBreakerValidationError struct {
	// contains filtered or unexported fields
}

CircuitBreakerValidationError is the validation error returned by CircuitBreaker.Validate if the designated constraints aren't met.

func (CircuitBreakerValidationError) Cause

Cause function returns cause value.

func (CircuitBreakerValidationError) Error

Error satisfies the builtin error interface

func (CircuitBreakerValidationError) ErrorName

func (e CircuitBreakerValidationError) ErrorName() string

ErrorName returns error name.

func (CircuitBreakerValidationError) Field

Field function returns field value.

func (CircuitBreakerValidationError) Key

Key function returns key value.

func (CircuitBreakerValidationError) Reason

Reason function returns reason value.

type CircuitBreaker_BackupService

type CircuitBreaker_BackupService struct {
	BackupService *BackupService `protobuf:"bytes,4,opt,name=backup_service,json=backupService,proto3,oneof"`
}

type CircuitBreaker_Ratio

type CircuitBreaker_Ratio struct {
	Ratio int64 `protobuf:"varint,2,opt,name=ratio,proto3,oneof"`
}

type CircuitBreaker_ResponseData

type CircuitBreaker_ResponseData struct {
	ResponseData *ResponseData `protobuf:"bytes,3,opt,name=response_data,json=responseData,proto3,oneof"`
}

type CircuitBreaker_SuccessRatio

type CircuitBreaker_SuccessRatio struct {
	SuccessRatio *SuccessRatio `protobuf:"bytes,1,opt,name=success_ratio,json=successRatio,proto3,oneof"`
}
type Header struct {
	Key   string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

func (*Header) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetKey

func (x *Header) GetKey() string

func (*Header) GetValue

func (x *Header) GetValue() []string

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

func (*Header) Validate

func (m *Header) Validate() error

Validate checks the field values on Header with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Header) ValidateAll

func (m *Header) ValidateAll() error

ValidateAll checks the field values on Header with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in HeaderMultiError, or nil if none found.

type HeaderMultiError

type HeaderMultiError []error

HeaderMultiError is an error wrapping multiple validation errors returned by Header.ValidateAll() if the designated constraints aren't met.

func (HeaderMultiError) AllErrors

func (m HeaderMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HeaderMultiError) Error

func (m HeaderMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type HeaderValidationError

type HeaderValidationError struct {
	// contains filtered or unexported fields
}

HeaderValidationError is the validation error returned by Header.Validate if the designated constraints aren't met.

func (HeaderValidationError) Cause

func (e HeaderValidationError) Cause() error

Cause function returns cause value.

func (HeaderValidationError) Error

func (e HeaderValidationError) Error() string

Error satisfies the builtin error interface

func (HeaderValidationError) ErrorName

func (e HeaderValidationError) ErrorName() string

ErrorName returns error name.

func (HeaderValidationError) Field

func (e HeaderValidationError) Field() string

Field function returns field value.

func (HeaderValidationError) Key

func (e HeaderValidationError) Key() bool

Key function returns key value.

func (HeaderValidationError) Reason

func (e HeaderValidationError) Reason() string

Reason function returns reason value.

type ResponseData

type ResponseData struct {
	StatusCode int32     `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`
	Header     []*Header `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty"`
	Body       []byte    `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

func (*ResponseData) Descriptor deprecated

func (*ResponseData) Descriptor() ([]byte, []int)

Deprecated: Use ResponseData.ProtoReflect.Descriptor instead.

func (*ResponseData) GetBody

func (x *ResponseData) GetBody() []byte

func (*ResponseData) GetHeader

func (x *ResponseData) GetHeader() []*Header

func (*ResponseData) GetStatusCode

func (x *ResponseData) GetStatusCode() int32

func (*ResponseData) ProtoMessage

func (*ResponseData) ProtoMessage()

func (*ResponseData) ProtoReflect

func (x *ResponseData) ProtoReflect() protoreflect.Message

func (*ResponseData) Reset

func (x *ResponseData) Reset()

func (*ResponseData) String

func (x *ResponseData) String() string

func (*ResponseData) Validate

func (m *ResponseData) Validate() error

Validate checks the field values on ResponseData with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ResponseData) ValidateAll

func (m *ResponseData) ValidateAll() error

ValidateAll checks the field values on ResponseData with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ResponseDataMultiError, or nil if none found.

type ResponseDataMultiError

type ResponseDataMultiError []error

ResponseDataMultiError is an error wrapping multiple validation errors returned by ResponseData.ValidateAll() if the designated constraints aren't met.

func (ResponseDataMultiError) AllErrors

func (m ResponseDataMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ResponseDataMultiError) Error

func (m ResponseDataMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ResponseDataValidationError

type ResponseDataValidationError struct {
	// contains filtered or unexported fields
}

ResponseDataValidationError is the validation error returned by ResponseData.Validate if the designated constraints aren't met.

func (ResponseDataValidationError) Cause

Cause function returns cause value.

func (ResponseDataValidationError) Error

Error satisfies the builtin error interface

func (ResponseDataValidationError) ErrorName

func (e ResponseDataValidationError) ErrorName() string

ErrorName returns error name.

func (ResponseDataValidationError) Field

Field function returns field value.

func (ResponseDataValidationError) Key

Key function returns key value.

func (ResponseDataValidationError) Reason

Reason function returns reason value.

type SuccessRatio

type SuccessRatio struct {
	Success float64 `protobuf:"fixed64,1,opt,name=success,proto3" json:"success,omitempty"`
	Request int32   `protobuf:"varint,2,opt,name=request,proto3" json:"request,omitempty"`
	Bucket  int32   `protobuf:"varint,3,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Window  int64   `protobuf:"varint,4,opt,name=window,proto3" json:"window,omitempty"`
	// contains filtered or unexported fields
}

func (*SuccessRatio) Descriptor deprecated

func (*SuccessRatio) Descriptor() ([]byte, []int)

Deprecated: Use SuccessRatio.ProtoReflect.Descriptor instead.

func (*SuccessRatio) GetBucket

func (x *SuccessRatio) GetBucket() int32

func (*SuccessRatio) GetRequest

func (x *SuccessRatio) GetRequest() int32

func (*SuccessRatio) GetSuccess

func (x *SuccessRatio) GetSuccess() float64

func (*SuccessRatio) GetWindow

func (x *SuccessRatio) GetWindow() int64

func (*SuccessRatio) ProtoMessage

func (*SuccessRatio) ProtoMessage()

func (*SuccessRatio) ProtoReflect

func (x *SuccessRatio) ProtoReflect() protoreflect.Message

func (*SuccessRatio) Reset

func (x *SuccessRatio) Reset()

func (*SuccessRatio) String

func (x *SuccessRatio) String() string

func (*SuccessRatio) Validate

func (m *SuccessRatio) Validate() error

Validate checks the field values on SuccessRatio with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SuccessRatio) ValidateAll

func (m *SuccessRatio) ValidateAll() error

ValidateAll checks the field values on SuccessRatio with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SuccessRatioMultiError, or nil if none found.

type SuccessRatioMultiError

type SuccessRatioMultiError []error

SuccessRatioMultiError is an error wrapping multiple validation errors returned by SuccessRatio.ValidateAll() if the designated constraints aren't met.

func (SuccessRatioMultiError) AllErrors

func (m SuccessRatioMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SuccessRatioMultiError) Error

func (m SuccessRatioMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SuccessRatioValidationError

type SuccessRatioValidationError struct {
	// contains filtered or unexported fields
}

SuccessRatioValidationError is the validation error returned by SuccessRatio.Validate if the designated constraints aren't met.

func (SuccessRatioValidationError) Cause

Cause function returns cause value.

func (SuccessRatioValidationError) Error

Error satisfies the builtin error interface

func (SuccessRatioValidationError) ErrorName

func (e SuccessRatioValidationError) ErrorName() string

ErrorName returns error name.

func (SuccessRatioValidationError) Field

Field function returns field value.

func (SuccessRatioValidationError) Key

Key function returns key value.

func (SuccessRatioValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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