StatelessRetrier

public protocol StatelessRetrier : Retrier

A stateless retrier is a retrier which does not need to track any state across retries. This implies that the stateless retrier does not allow multiple retries. As it is stateless, it must be initializable with no parameters. The advantage is that a factory can easily be derived.

  • Initializes the stateless retrier. Most of the time, this method will probably be empty.

    Declaration

    Swift

    init()
  • factory() Extension method

    Creates a factory for the retrier class it is called on. The factory simply uses the empty initializer to yield instances of the class.

    Declaration

    Swift

    public static func factory() -> some RetrierFactory