Structuregrpc-swift 2.0.0GRPCCore
RetryThrottling
ServiceConfig.swift:229struct RetryThrottling
struct RetryThrottling
import GRPCCore
A gRPC library for Swift written natively in Swift.
struct ServiceConfig
Service configuration values.
init(from decoder: any Decoder) throws
init(methodConfig: [MethodConfig] = [], loadBalancingConfig: [LoadBalancingConfig] = [], retryThrottling: RetryThrottling? = nil)
Creates a new ServiceConfig
.
var loadBalancingConfig: [LoadBalancingConfig]
Load balancing policies.
var methodConfig: [MethodConfig]
Per-method configuration.
var retryThrottling: RetryThrottling?
The policy for throttling retries.
func encode(to encoder: any Encoder) throws
struct LoadBalancingConfig
Configuration used by clients for load-balancing.
protocol Decodable
A type that can decode itself from an external representation.
protocol Encodable
A type that can encode itself to an external representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
init(from decoder: any Decoder) throws
init(maxTokens: Int, tokenRatio: Double) throws
Creates a new retry throttling policy.
var maxTokens: Int
The initial, and maximum number of tokens.
var tokenRatio: Double
The amount of tokens to add on each successful RPC.
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.