_type

package
v0.22.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0 Imports: 17 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FractionalPercent_DenominatorType_name = map[int32]string{
		0: "HUNDRED",
		1: "TEN_THOUSAND",
		2: "MILLION",
	}
	FractionalPercent_DenominatorType_value = map[string]int32{
		"HUNDRED":      0,
		"TEN_THOUSAND": 1,
		"MILLION":      2,
	}
)

Enum value maps for FractionalPercent_DenominatorType.

View Source
var File_github_com_solo_io_solo_kit_api_external_envoy_type_percent_proto protoreflect.FileDescriptor
View Source
var File_github_com_solo_io_solo_kit_api_external_envoy_type_semantic_version_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type FractionalPercent

type FractionalPercent struct {

	// Specifies the numerator. Defaults to 0.
	Numerator uint32 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"`
	// Specifies the denominator. If the denominator specified is less than the numerator, the final
	// fractional percentage is capped at 1 (100%).
	Denominator FractionalPercent_DenominatorType `` /* 134-byte string literal not displayed */
	// contains filtered or unexported fields
}

A fractional percentage is used in cases in which for performance reasons performing floating point to integer conversions during randomness calculations is undesirable. The message includes both a numerator and denominator that together determine the final fractional value.

* **Example**: 1/100 = 1%. * **Example**: 3/10000 = 0.03%.

func (*FractionalPercent) Descriptor deprecated

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

Deprecated: Use FractionalPercent.ProtoReflect.Descriptor instead.

func (*FractionalPercent) Equal

func (m *FractionalPercent) Equal(that interface{}) bool

Equal function

func (*FractionalPercent) GetDenominator

func (*FractionalPercent) GetNumerator

func (x *FractionalPercent) GetNumerator() uint32

func (*FractionalPercent) Hash added in v0.11.14

func (m *FractionalPercent) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*FractionalPercent) ProtoMessage

func (*FractionalPercent) ProtoMessage()

func (*FractionalPercent) ProtoReflect added in v0.16.0

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

func (*FractionalPercent) Reset

func (x *FractionalPercent) Reset()

func (*FractionalPercent) String

func (x *FractionalPercent) String() string

type FractionalPercent_DenominatorType

type FractionalPercent_DenominatorType int32

Fraction percentages support several fixed denominator values.

const (
	// 100.
	//
	// **Example**: 1/100 = 1%.
	FractionalPercent_HUNDRED FractionalPercent_DenominatorType = 0
	// 10,000.
	//
	// **Example**: 1/10000 = 0.01%.
	FractionalPercent_TEN_THOUSAND FractionalPercent_DenominatorType = 1
	// 1,000,000.
	//
	// **Example**: 1/1000000 = 0.0001%.
	FractionalPercent_MILLION FractionalPercent_DenominatorType = 2
)

func (FractionalPercent_DenominatorType) Descriptor added in v0.16.0

func (FractionalPercent_DenominatorType) Enum added in v0.16.0

func (FractionalPercent_DenominatorType) EnumDescriptor deprecated

func (FractionalPercent_DenominatorType) EnumDescriptor() ([]byte, []int)

Deprecated: Use FractionalPercent_DenominatorType.Descriptor instead.

func (FractionalPercent_DenominatorType) Number added in v0.16.0

func (FractionalPercent_DenominatorType) String

func (FractionalPercent_DenominatorType) Type added in v0.16.0

type Percent

type Percent struct {
	Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Identifies a percentage, in the range [0.0, 100.0].

func (*Percent) Descriptor deprecated

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

Deprecated: Use Percent.ProtoReflect.Descriptor instead.

func (*Percent) Equal

func (m *Percent) Equal(that interface{}) bool

Equal function

func (*Percent) GetValue

func (x *Percent) GetValue() float64

func (*Percent) Hash added in v0.11.14

func (m *Percent) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*Percent) ProtoMessage

func (*Percent) ProtoMessage()

func (*Percent) ProtoReflect added in v0.16.0

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

func (*Percent) Reset

func (x *Percent) Reset()

func (*Percent) String

func (x *Percent) String() string

type SemanticVersion added in v0.20.0

type SemanticVersion struct {
	MajorNumber uint32 `protobuf:"varint,1,opt,name=major_number,json=majorNumber,proto3" json:"major_number,omitempty"`
	MinorNumber uint32 `protobuf:"varint,2,opt,name=minor_number,json=minorNumber,proto3" json:"minor_number,omitempty"`
	Patch       uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"`
	// contains filtered or unexported fields
}

Envoy uses SemVer (https://semver.org/). Major/minor versions indicate expected behaviors and APIs, the patch version field is used only for security fixes and can be generally ignored.

func (*SemanticVersion) Descriptor deprecated added in v0.20.0

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

Deprecated: Use SemanticVersion.ProtoReflect.Descriptor instead.

func (*SemanticVersion) Equal added in v0.20.0

func (m *SemanticVersion) Equal(that interface{}) bool

Equal function

func (*SemanticVersion) GetMajorNumber added in v0.20.0

func (x *SemanticVersion) GetMajorNumber() uint32

func (*SemanticVersion) GetMinorNumber added in v0.20.0

func (x *SemanticVersion) GetMinorNumber() uint32

func (*SemanticVersion) GetPatch added in v0.20.0

func (x *SemanticVersion) GetPatch() uint32

func (*SemanticVersion) Hash added in v0.20.0

func (m *SemanticVersion) Hash(hasher hash.Hash64) (uint64, error)

Hash function

func (*SemanticVersion) ProtoMessage added in v0.20.0

func (*SemanticVersion) ProtoMessage()

func (*SemanticVersion) ProtoReflect added in v0.20.0

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

func (*SemanticVersion) Reset added in v0.20.0

func (x *SemanticVersion) Reset()

func (*SemanticVersion) String added in v0.20.0

func (x *SemanticVersion) String() string

Jump to

Keyboard shortcuts

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