Initializergrpc-swift 2.0.0GRPCCore
init(from:)
MethodConfig.swift:490init(from decoder: any Decoder) throws
init(from decoder: any Decoder) throws
import GRPCCore
A gRPC library for Swift written natively in Swift.
struct RetryPolicy
Policy for retrying an RPC.
protocol Decoder
A type that can decode values from a native format into in-memory representations.
init(maxAttempts: Int, initialBackoff: Duration, maxBackoff: Duration, backoffMultiplier: Double, retryableStatusCodes: Set<Status.Code>)
Create a new retry policy.
var backoffMultiplier: Double { get set }
The multiplier to apply to backoff.
var initialBackoff: Duration { get set }
The initial backoff duration.
var maxAttempts: Int { get set }
The maximum number of RPC attempts, including the original attempt.
var maxBackoff: Duration { get set }
The maximum amount of time to backoff for.
var retryableStatusCodes: Set<Status.Code> { get set }
The set of status codes which may be retried.
func encode(to encoder: any Encoder) throws