LifecycleHandler

extension LifecycleHandler
  • Asynchronous LifecycleHandler based on an EventLoopFuture.

    Declaration

    Swift

    public static func eventLoopFuture(_ future: @escaping () -> EventLoopFuture<Void>) -> LifecycleHandler

    Parameters

    future

    function returning the underlying EventLoopFuture

  • LifecycleHandler that cancels a RepeatedTask.

    Declaration

    Swift

    public static func cancelRepeatedTask(_ task: RepeatedTask, on eventLoop: EventLoop) -> LifecycleHandler

    Parameters

    task

    RepeatedTask to be cancelled

    on

    EventLoop to use for cancelling the task