runtime_fractionv3

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

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

Cause function returns cause value.

func (RuntimeFractionValidationError) Error

Error satisfies the builtin error interface

func (RuntimeFractionValidationError) ErrorName

func (e RuntimeFractionValidationError) ErrorName() string

ErrorName returns error name.

func (RuntimeFractionValidationError) Field

Field function returns field value.

func (RuntimeFractionValidationError) Key

Key function returns key value.

func (RuntimeFractionValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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