retry

package
v0.0.0-...-e7c9706 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPolicy

func ConvertPolicy(in *networking.HTTPRetry, hashPolicy bool) *route.RetryPolicy

ConvertPolicy converts the given Istio retry policy to an Envoy policy.

If in is nil, DefaultPolicy is returned.

If in.Attempts == 0, returns nil.

Otherwise, the returned policy is DefaultPolicy with the following overrides:

- NumRetries: set from in.Attempts

- RetryOn, RetriableStatusCodes: set from in.RetryOn (if specified). RetriableStatusCodes is appended when encountering parts that are valid HTTP status codes.

- PerTryTimeout: set from in.PerTryTimeout (if specified)

func DefaultConsistentHashPolicy

func DefaultConsistentHashPolicy() *route.RetryPolicy

DefaultConsistentHashPolicy gets a copy of the default retry policy without previous host predicate. When Consistent Hashing is enabled, we don't want to use other hosts during retries.

func DefaultPolicy

func DefaultPolicy() *route.RetryPolicy

DefaultPolicy gets a copy of the default retry policy.

Types

This section is empty.

Jump to

Keyboard shortcuts

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