packages feed

keiro-dsl-0.10.0.0: test/conformance-skeletons/SkelRouter/Generated/MyService/PagingRouter/Router.hs

-- @generated by keiro-dsl 0.9.0.0 (language keiro-dsl 4) from router PagingRouter; do not edit.
module SkelRouter.Generated.MyService.PagingRouter.Router
  ( pagingRouterName
  , pagingRouterWorkerOptions
  ) where

import Data.Text (Text)
import Keiro.ProcessManager (PoisonPolicy (..), RejectedCommandPolicy (..), WorkerOptions (..))
import Shibuya.Core.Ack (RetryDelay (..))

-- The STABLE router name. It participates in every target-keyed
-- deterministicRouterCommandId; renaming it re-keys replayed dispatches.
pagingRouterName :: Text
pagingRouterName = "paging-router"

-- Runtime-owned dispatch id inputs: (name, key, sourceEventId,
-- targetStreamName, occurrence). Target-keyed, not positional.

-- Node-level worker policy lowered from the spec. Pass this value to
-- Keiro.Router.runRouterWorkerWith; do not silently use defaultWorkerOptions.
pagingRouterWorkerOptions :: WorkerOptions es msg
pagingRouterWorkerOptions =
  WorkerOptions
    { poisonPolicy = PoisonHalt,
      rejectedCommandPolicy = RejectedHalt,
      transientRetryDelay = RetryDelay 5, -- matches defaultWorkerOptions; runtime tuning
      metrics = Nothing -- runtime configuration; install at call site
    }