Documentation ¶
Index ¶
- Variables
- type RuntimeFraction
- func (*RuntimeFraction) Descriptor() ([]byte, []int)deprecated
- func (x *RuntimeFraction) GetRuntimeFraction() *v3.RuntimeFractionalPercent
- func (x *RuntimeFraction) GetSeed() uint64
- func (*RuntimeFraction) ProtoMessage()
- func (x *RuntimeFraction) ProtoReflect() protoreflect.Message
- func (x *RuntimeFraction) Reset()
- func (x *RuntimeFraction) String() string
- func (m *RuntimeFraction) Validate() error
- func (m *RuntimeFraction) ValidateAll() error
- type RuntimeFractionMultiError
- type RuntimeFractionValidationError
- func (e RuntimeFractionValidationError) Cause() error
- func (e RuntimeFractionValidationError) Error() string
- func (e RuntimeFractionValidationError) ErrorName() string
- func (e RuntimeFractionValidationError) Field() string
- func (e RuntimeFractionValidationError) Key() bool
- func (e RuntimeFractionValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var File_envoy_extensions_matching_input_matchers_runtime_fraction_v3_runtime_fraction_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type RuntimeFraction ¶
type RuntimeFraction struct { // Match the input against the given runtime key. The specified default value is used if key is not // present in the runtime configuration. RuntimeFraction *v3.RuntimeFractionalPercent `protobuf:"bytes,1,opt,name=runtime_fraction,json=runtimeFraction,proto3" json:"runtime_fraction,omitempty"` // Optional seed passed through the hash function. This allows using additional information when computing // the hash value: by changing the seed value, a potentially different outcome can be achieved for the same input. Seed uint64 `protobuf:"varint,2,opt,name=seed,proto3" json:"seed,omitempty"` // contains filtered or unexported fields }
The runtime fraction matchers computes a hash from the input and matches if runtime feature is enabled for the the resulting hash. Every time the input is considered for a match, its hash must fall within the percentage of matches indicated by this field. For a fraction N/D, a number is computed as a hash of the input on a field in the range [0,D). If the number is less than or equal to the value of the numerator N, the matcher evaluates to true. A runtime_fraction input matcher can be used to gradually roll out matcher changes without requiring full code or configuration deployments. Note that distribution of matching results is only as good as one of the input.
func (*RuntimeFraction) Descriptor
deprecated
func (*RuntimeFraction) Descriptor() ([]byte, []int)
Deprecated: Use RuntimeFraction.ProtoReflect.Descriptor instead.
func (*RuntimeFraction) GetRuntimeFraction ¶
func (x *RuntimeFraction) GetRuntimeFraction() *v3.RuntimeFractionalPercent
func (*RuntimeFraction) GetSeed ¶
func (x *RuntimeFraction) GetSeed() uint64
func (*RuntimeFraction) ProtoMessage ¶
func (*RuntimeFraction) ProtoMessage()
func (*RuntimeFraction) ProtoReflect ¶
func (x *RuntimeFraction) ProtoReflect() protoreflect.Message
func (*RuntimeFraction) Reset ¶
func (x *RuntimeFraction) Reset()
func (*RuntimeFraction) String ¶
func (x *RuntimeFraction) String() string
func (*RuntimeFraction) Validate ¶
func (m *RuntimeFraction) Validate() error
Validate checks the field values on RuntimeFraction 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 (*RuntimeFraction) ValidateAll ¶
func (m *RuntimeFraction) ValidateAll() error
ValidateAll checks the field values on RuntimeFraction 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 RuntimeFractionMultiError, or nil if none found.
type RuntimeFractionMultiError ¶
type RuntimeFractionMultiError []error
RuntimeFractionMultiError is an error wrapping multiple validation errors returned by RuntimeFraction.ValidateAll() if the designated constraints aren't met.
func (RuntimeFractionMultiError) AllErrors ¶
func (m RuntimeFractionMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (RuntimeFractionMultiError) Error ¶
func (m RuntimeFractionMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type RuntimeFractionValidationError ¶
type RuntimeFractionValidationError struct {
// contains filtered or unexported fields
}
RuntimeFractionValidationError is the validation error returned by RuntimeFraction.Validate if the designated constraints aren't met.
func (RuntimeFractionValidationError) Cause ¶
func (e RuntimeFractionValidationError) Cause() error
Cause function returns cause value.
func (RuntimeFractionValidationError) Error ¶
func (e RuntimeFractionValidationError) Error() string
Error satisfies the builtin error interface
func (RuntimeFractionValidationError) ErrorName ¶
func (e RuntimeFractionValidationError) ErrorName() string
ErrorName returns error name.
func (RuntimeFractionValidationError) Field ¶
func (e RuntimeFractionValidationError) Field() string
Field function returns field value.
func (RuntimeFractionValidationError) Key ¶
func (e RuntimeFractionValidationError) Key() bool
Key function returns key value.
func (RuntimeFractionValidationError) Reason ¶
func (e RuntimeFractionValidationError) Reason() string
Reason function returns reason value.