Documentation ¶
Index ¶
- Constants
- Variables
- type Backoff
- func (m *Backoff) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Backoff) CloneVT() *Backoff
- func (b *Backoff) Construct() backoff.BackOff
- func (this *Backoff) EqualMessageVT(thatMsg any) bool
- func (this *Backoff) EqualVT(that *Backoff) bool
- func (x *Backoff) GetBackoffKind() BackoffKind
- func (x *Backoff) GetConstant() *Constant
- func (b *Backoff) GetEmpty() bool
- func (x *Backoff) GetExponential() *Exponential
- func (x *Backoff) MarshalJSON() ([]byte, error)
- func (x *Backoff) MarshalProtoJSON(s *json.MarshalState)
- func (x *Backoff) MarshalProtoText() string
- func (m *Backoff) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Backoff) MarshalToVT(dAtA []byte) (int, error)
- func (m *Backoff) MarshalVT() (dAtA []byte, err error)
- func (*Backoff) ProtoMessage()
- func (x *Backoff) Reset()
- func (m *Backoff) SizeVT() (n int)
- func (x *Backoff) String() string
- func (x *Backoff) UnmarshalJSON(b []byte) error
- func (x *Backoff) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Backoff) UnmarshalVT(dAtA []byte) error
- func (b *Backoff) Validate(allowEmpty bool) error
- type BackoffKind
- func (x BackoffKind) Enum() *BackoffKind
- func (x BackoffKind) MarshalJSON() ([]byte, error)
- func (x BackoffKind) MarshalProtoJSON(s *json.MarshalState)
- func (x BackoffKind) MarshalProtoText() string
- func (x BackoffKind) MarshalText() ([]byte, error)
- func (x BackoffKind) String() string
- func (x *BackoffKind) UnmarshalJSON(b []byte) error
- func (x *BackoffKind) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (x *BackoffKind) UnmarshalText(b []byte) error
- func (b BackoffKind) Validate() error
- type Constant
- func (m *Constant) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Constant) CloneVT() *Constant
- func (this *Constant) EqualMessageVT(thatMsg any) bool
- func (this *Constant) EqualVT(that *Constant) bool
- func (x *Constant) GetInterval() uint32
- func (x *Constant) MarshalJSON() ([]byte, error)
- func (x *Constant) MarshalProtoJSON(s *json.MarshalState)
- func (x *Constant) MarshalProtoText() string
- func (m *Constant) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Constant) MarshalToVT(dAtA []byte) (int, error)
- func (m *Constant) MarshalVT() (dAtA []byte, err error)
- func (*Constant) ProtoMessage()
- func (x *Constant) Reset()
- func (m *Constant) SizeVT() (n int)
- func (x *Constant) String() string
- func (x *Constant) UnmarshalJSON(b []byte) error
- func (x *Constant) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Constant) UnmarshalVT(dAtA []byte) error
- type Exponential
- func (m *Exponential) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *Exponential) CloneVT() *Exponential
- func (this *Exponential) EqualMessageVT(thatMsg any) bool
- func (this *Exponential) EqualVT(that *Exponential) bool
- func (x *Exponential) GetInitialInterval() uint32
- func (x *Exponential) GetMaxElapsedTime() uint32
- func (x *Exponential) GetMaxInterval() uint32
- func (x *Exponential) GetMultiplier() float32
- func (x *Exponential) GetRandomizationFactor() float32
- func (x *Exponential) MarshalJSON() ([]byte, error)
- func (x *Exponential) MarshalProtoJSON(s *json.MarshalState)
- func (x *Exponential) MarshalProtoText() string
- func (m *Exponential) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Exponential) MarshalToVT(dAtA []byte) (int, error)
- func (m *Exponential) MarshalVT() (dAtA []byte, err error)
- func (*Exponential) ProtoMessage()
- func (x *Exponential) Reset()
- func (m *Exponential) SizeVT() (n int)
- func (x *Exponential) String() string
- func (x *Exponential) UnmarshalJSON(b []byte) error
- func (x *Exponential) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *Exponential) UnmarshalVT(dAtA []byte) error
Constants ¶
const Stop = backoff.Stop
Stop indicates that no more retries should be made for use in NextBackOff().
Variables ¶
var ( BackoffKind_name = map[int32]string{ 0: "BackoffKind_UNKNOWN", 1: "BackoffKind_EXPONENTIAL", 2: "BackoffKind_CONSTANT", } BackoffKind_value = map[string]int32{ "BackoffKind_UNKNOWN": 0, "BackoffKind_EXPONENTIAL": 1, "BackoffKind_CONSTANT": 2, } )
Enum value maps for BackoffKind.
Functions ¶
This section is empty.
Types ¶
type Backoff ¶
type Backoff struct { // BackoffKind is the kind of backoff. BackoffKind BackoffKind `protobuf:"varint,1,opt,name=backoff_kind,json=backoffKind,proto3" json:"backoffKind,omitempty"` // Exponential is the arguments for an exponential backoff. Exponential *Exponential `protobuf:"bytes,2,opt,name=exponential,proto3" json:"exponential,omitempty"` // Constant is the arugment for a constant backoff. Constant *Constant `protobuf:"bytes,3,opt,name=constant,proto3" json:"constant,omitempty"` // contains filtered or unexported fields }
Backoff configures a backoff.
func (*Backoff) CloneMessageVT ¶ added in v1.1.2
func (m *Backoff) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Backoff) EqualMessageVT ¶ added in v1.1.2
func (*Backoff) GetBackoffKind ¶
func (x *Backoff) GetBackoffKind() BackoffKind
func (*Backoff) GetConstant ¶
func (*Backoff) GetExponential ¶
func (x *Backoff) GetExponential() *Exponential
func (*Backoff) MarshalJSON ¶ added in v1.12.2
MarshalJSON marshals the Backoff to JSON.
func (*Backoff) MarshalProtoJSON ¶ added in v1.12.2
func (x *Backoff) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Backoff message to JSON.
func (*Backoff) MarshalProtoText ¶ added in v1.12.2
func (*Backoff) MarshalToSizedBufferVT ¶
func (*Backoff) ProtoMessage ¶
func (*Backoff) ProtoMessage()
func (*Backoff) UnmarshalJSON ¶ added in v1.12.2
UnmarshalJSON unmarshals the Backoff from JSON.
func (*Backoff) UnmarshalProtoJSON ¶ added in v1.12.2
func (x *Backoff) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Backoff message from JSON.
func (*Backoff) UnmarshalVT ¶
type BackoffKind ¶
type BackoffKind int32
BackoffKind is the kind of backoff.
const ( // BackoffKind_UNKNOWN defaults to BackoffKind_EXPONENTIAL BackoffKind_BackoffKind_UNKNOWN BackoffKind = 0 // BackoffKind_EXPONENTIAL is an exponential backoff. BackoffKind_BackoffKind_EXPONENTIAL BackoffKind = 1 // BackoffKind_CONSTANT is a constant backoff. BackoffKind_BackoffKind_CONSTANT BackoffKind = 2 )
func (BackoffKind) Enum ¶
func (x BackoffKind) Enum() *BackoffKind
func (BackoffKind) MarshalJSON ¶ added in v1.12.2
func (x BackoffKind) MarshalJSON() ([]byte, error)
MarshalJSON marshals the BackoffKind to JSON.
func (BackoffKind) MarshalProtoJSON ¶ added in v1.12.2
func (x BackoffKind) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the BackoffKind to JSON.
func (BackoffKind) MarshalProtoText ¶ added in v1.12.2
func (x BackoffKind) MarshalProtoText() string
func (BackoffKind) MarshalText ¶ added in v1.12.2
func (x BackoffKind) MarshalText() ([]byte, error)
MarshalText marshals the BackoffKind to text.
func (BackoffKind) String ¶
func (x BackoffKind) String() string
func (*BackoffKind) UnmarshalJSON ¶ added in v1.12.2
func (x *BackoffKind) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the BackoffKind from JSON.
func (*BackoffKind) UnmarshalProtoJSON ¶ added in v1.12.2
func (x *BackoffKind) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the BackoffKind from JSON.
func (*BackoffKind) UnmarshalText ¶ added in v1.12.2
func (x *BackoffKind) UnmarshalText(b []byte) error
UnmarshalText unmarshals the BackoffKind from text.
func (BackoffKind) Validate ¶ added in v1.0.3
func (b BackoffKind) Validate() error
Validate validates the backoff kind.
type Constant ¶
type Constant struct { // Interval is the timing to back off, in milliseconds. // Defaults to 5 seconds. Interval uint32 `protobuf:"varint,1,opt,name=interval,proto3" json:"interval,omitempty"` // contains filtered or unexported fields }
Constant contains constant backoff options.
func (*Constant) CloneMessageVT ¶ added in v1.1.2
func (m *Constant) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Constant) EqualMessageVT ¶ added in v1.1.2
func (*Constant) GetInterval ¶
func (*Constant) MarshalJSON ¶ added in v1.12.2
MarshalJSON marshals the Constant to JSON.
func (*Constant) MarshalProtoJSON ¶ added in v1.12.2
func (x *Constant) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Constant message to JSON.
func (*Constant) MarshalProtoText ¶ added in v1.12.2
func (*Constant) MarshalToSizedBufferVT ¶
func (*Constant) ProtoMessage ¶
func (*Constant) ProtoMessage()
func (*Constant) UnmarshalJSON ¶ added in v1.12.2
UnmarshalJSON unmarshals the Constant from JSON.
func (*Constant) UnmarshalProtoJSON ¶ added in v1.12.2
func (x *Constant) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Constant message from JSON.
func (*Constant) UnmarshalVT ¶
type Exponential ¶
type Exponential struct { // InitialInterval is the initial interval in milliseconds. // Default: 800ms. InitialInterval uint32 `protobuf:"varint,1,opt,name=initial_interval,json=initialInterval,proto3" json:"initialInterval,omitempty"` // Multiplier is the timing multiplier. // Default: 1.8 Multiplier float32 `protobuf:"fixed32,2,opt,name=multiplier,proto3" json:"multiplier,omitempty"` // MaxInterval is the maximum timing interval in milliseconds. // Default: 20 seconds MaxInterval uint32 `protobuf:"varint,3,opt,name=max_interval,json=maxInterval,proto3" json:"maxInterval,omitempty"` // RandomizationFactor is the randomization factor. // Should be from [0, 1] as a percentage of the retry interval. // // randomized interval = RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor]) // // Default: 0 (disabled) RandomizationFactor float32 `protobuf:"fixed32,4,opt,name=randomization_factor,json=randomizationFactor,proto3" json:"randomizationFactor,omitempty"` // MaxElapsedTime if set specifies a maximum time for the backoff, in milliseconds. // After this time the backoff and attached process terminates. // May be empty, might be ignored. MaxElapsedTime uint32 `protobuf:"varint,5,opt,name=max_elapsed_time,json=maxElapsedTime,proto3" json:"maxElapsedTime,omitempty"` // contains filtered or unexported fields }
Exponential is the exponential arguments.
func (*Exponential) CloneMessageVT ¶ added in v1.1.2
func (m *Exponential) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*Exponential) CloneVT ¶
func (m *Exponential) CloneVT() *Exponential
func (*Exponential) EqualMessageVT ¶ added in v1.1.2
func (this *Exponential) EqualMessageVT(thatMsg any) bool
func (*Exponential) EqualVT ¶
func (this *Exponential) EqualVT(that *Exponential) bool
func (*Exponential) GetInitialInterval ¶
func (x *Exponential) GetInitialInterval() uint32
func (*Exponential) GetMaxElapsedTime ¶
func (x *Exponential) GetMaxElapsedTime() uint32
func (*Exponential) GetMaxInterval ¶
func (x *Exponential) GetMaxInterval() uint32
func (*Exponential) GetMultiplier ¶
func (x *Exponential) GetMultiplier() float32
func (*Exponential) GetRandomizationFactor ¶
func (x *Exponential) GetRandomizationFactor() float32
func (*Exponential) MarshalJSON ¶ added in v1.12.2
func (x *Exponential) MarshalJSON() ([]byte, error)
MarshalJSON marshals the Exponential to JSON.
func (*Exponential) MarshalProtoJSON ¶ added in v1.12.2
func (x *Exponential) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the Exponential message to JSON.
func (*Exponential) MarshalProtoText ¶ added in v1.12.2
func (x *Exponential) MarshalProtoText() string
func (*Exponential) MarshalToSizedBufferVT ¶
func (m *Exponential) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*Exponential) MarshalToVT ¶
func (m *Exponential) MarshalToVT(dAtA []byte) (int, error)
func (*Exponential) MarshalVT ¶
func (m *Exponential) MarshalVT() (dAtA []byte, err error)
func (*Exponential) ProtoMessage ¶
func (*Exponential) ProtoMessage()
func (*Exponential) Reset ¶
func (x *Exponential) Reset()
func (*Exponential) SizeVT ¶
func (m *Exponential) SizeVT() (n int)
func (*Exponential) String ¶
func (x *Exponential) String() string
func (*Exponential) UnmarshalJSON ¶ added in v1.12.2
func (x *Exponential) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the Exponential from JSON.
func (*Exponential) UnmarshalProtoJSON ¶ added in v1.12.2
func (x *Exponential) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the Exponential message from JSON.
func (*Exponential) UnmarshalVT ¶
func (m *Exponential) UnmarshalVT(dAtA []byte) error