| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Servant
Description
Servant REST API for Arbiter job queue administration. See ArbiterAPI
for the route tree.
Quick Start
import Arbiter.Servant import Data.Proxy (Proxy(..)) main :: IO () main = do -- Run migrations with event streaming enabled before starting the server. -- The server config creates its own connection pool. config <- initArbiterServer (Proxy @MyRegistry) connStr "public" -- Start API server on port 8080 runArbiterAPI 8080 config
Synopsis
- data QueueSpec = QueueWithResult Symbol Type Type
- type Queue (table :: Symbol) payload = 'QueueWithResult table payload ()
- arbiterServer :: forall (registry :: JobPayloadRegistry). BuildServer registry registry => ArbiterServerConfig registry -> ServerT (ArbiterAPI registry) Handler
- arbiterApp :: forall (registry :: JobPayloadRegistry). (BuildServer registry registry, HasServer (ArbiterAPI registry) ('[] :: [Type])) => ArbiterServerConfig registry -> Application
- runArbiterAPI :: forall (registry :: JobPayloadRegistry). (BuildServer registry registry, HasServer (ArbiterAPI registry) ('[] :: [Type])) => Port -> ArbiterServerConfig registry -> IO ()
- data ArbiterServerConfig (registry :: JobPayloadRegistry) = ArbiterServerConfig {
- serverEnv :: SimpleEnv registry
- enableSSE :: Bool
- sseHub :: MVar (Maybe SSEHub)
- rateLimitPoliciesCache :: CacheCell RateLimitPoliciesResponse
- concurrencyPoliciesCache :: CacheCell ConcurrencyPoliciesResponse
- allQueueStatsCache :: CacheCell AllStatsResponse
- queueStatsCache :: CacheCell StatsResponse
- queueStatsCacheTtl :: NominalDiffTime
- healthCache :: CacheCell HealthResponse
- maintenanceInterval :: NominalDiffTime
- maintenanceSparseInterval :: NominalDiffTime
- maintenanceBucketIdle :: NominalDiffTime
- maintenanceTimeout :: NominalDiffTime
- initArbiterServer :: forall (registry :: JobPayloadRegistry). Proxy registry -> ByteString -> Text -> IO (ArbiterServerConfig registry)
- defaultQueueStatsCacheTtl :: NominalDiffTime
- defaultMaintenanceInterval :: NominalDiffTime
- defaultMaintenanceBucketIdle :: NominalDiffTime
- defaultMaintenanceSparseInterval :: NominalDiffTime
- defaultMaintenanceTimeout :: NominalDiffTime
- class BuildServer (registry :: JobPayloadRegistry) (reg :: JobPayloadRegistry) where
- buildServer :: ArbiterServerConfig registry -> ServerT (RegistryToAPI reg) Handler
- type ArbiterAPI (registry :: JobPayloadRegistry) = "api" :> ("v1" :> RegistryToAPI registry)
- type family RegistryToAPI (registry :: JobPayloadRegistry) where ...
- data TableAPI payload result (mode :: k) = TableAPI {
- jobs :: mode :- ("jobs" :> NamedRoutes (JobsAPI payload result :: Type -> Type))
- claimJobs :: mode :- ("claim" :> (ReqBody '[JSON] ClaimRequest :> Post '[JSON] (ClaimResponse payload)))
- dlq :: mode :- ("dlq" :> NamedRoutes (DLQAPI payload :: Type -> Type))
- archive :: mode :- ("archive" :> NamedRoutes (ArchiveAPI payload :: Type -> Type))
- stats :: mode :- ("stats" :> NamedRoutes (StatsAPI :: Type -> Type))
- listKinds :: mode :- ("kinds" :> Get '[JSON] [Text])
- type SharedAPI = ("queues" :> NamedRoutes (QueuesAPI :: Type -> Type)) :<|> (("maintenance" :> NamedRoutes (MaintenanceAPI :: Type -> Type)) :<|> (("events" :> EventsAPI) :<|> (("cron" :> NamedRoutes (CronAPI :: Type -> Type)) :<|> (("workers" :> NamedRoutes (WorkersAPI :: Type -> Type)) :<|> (("rate-limits" :> NamedRoutes (RateLimitsAPI :: Type -> Type)) :<|> (("concurrency" :> NamedRoutes (ConcurrencyAPI :: Type -> Type)) :<|> ("health" :> NamedRoutes (HealthAPI :: Type -> Type))))))))
- type EventsAPI = "stream" :> Raw
- data QueuesAPI (mode :: k) = QueuesAPI {
- listQueues :: mode :- Get '[JSON] QueuesResponse
- getAllStats :: mode :- ("stats" :> Get '[JSON] AllStatsResponse)
- getDetails :: mode :- (Capture "queue" Text :> ("details" :> Get '[JSON] (Maybe QueueRow)))
- pauseQueue :: mode :- (Capture "queue" Text :> ("pause" :> PostNoContent))
- resumeQueue :: mode :- (Capture "queue" Text :> ("resume" :> PostNoContent))
- data JobsAPI payload result (mode :: k) = JobsAPI {
- listJobs :: mode :- (QueryParam "limit" Int :> (QueryParam "offset" Int :> (QueryParam "group_key" Text :> (QueryParam "parent_id" Int64 :> (QueryParam "job_id" Int64 :> (QueryFlag "roots_only" :> (QueryParam "status" JobStatus :> (QueryParam "claimed_by" UUID :> (QueryParam "kind" Text :> (QueryParam "payload" Text :> (QueryParam "rate_limit_prefix" Text :> (QueryParam "concurrency_prefix" Text :> (QueryParam "sort_by" JobSortColumn :> (QueryParam "sort_dir" SortDir :> Get '[JSON] (JobsResponse payload)))))))))))))))
- insertJob :: mode :- (ReqBody '[JSON] (ApiJobWrite payload) :> Post '[JSON] (JobResponse (ApiJob payload)))
- insertJobsBatch :: mode :- ("batch" :> (ReqBody '[JSON] (BatchInsertRequest payload) :> Post '[JSON] (BatchInsertResponse payload)))
- getJob :: mode :- (Capture "id" Int64 :> Get '[JSON] (JobResponse (ApiJobWithStatus payload)))
- cancelJob :: mode :- (Capture "id" Int64 :> DeleteNoContent)
- forceCancelJob :: mode :- (Capture "id" Int64 :> ("force-cancel" :> PostNoContent))
- ackClaimedJob :: mode :- (Capture "id" Int64 :> ("ack" :> (ReqBody '[JSON] (AckRequest result) :> PostNoContent)))
- nackClaimedJob :: mode :- (Capture "id" Int64 :> ("nack" :> (ReqBody '[JSON] JobLease :> PostNoContent)))
- extendClaimedJob :: mode :- (Capture "id" Int64 :> ("extend" :> (ReqBody '[JSON] ExtendRequest :> PostNoContent)))
- promoteJob :: mode :- (Capture "id" Int64 :> ("promote" :> PostNoContent))
- moveToDLQ :: mode :- (Capture "id" Int64 :> ("move-to-dlq" :> PostNoContent))
- pauseChildren :: mode :- (Capture "id" Int64 :> ("pause-children" :> PostNoContent))
- resumeChildren :: mode :- (Capture "id" Int64 :> ("resume-children" :> PostNoContent))
- suspendJob :: mode :- (Capture "id" Int64 :> ("suspend" :> PostNoContent))
- resumeJob :: mode :- (Capture "id" Int64 :> ("resume" :> PostNoContent))
- data DLQAPI payload (mode :: k) = DLQAPI {
- listDLQ :: mode :- (QueryParam "limit" Int :> (QueryParam "offset" Int :> (QueryParam "parent_id" Int64 :> (QueryParam "job_id" Int64 :> (QueryParam "group_key" Text :> (QueryParam "kind" Text :> (QueryParam "sort_by" DLQSortColumn :> (QueryParam "sort_dir" SortDir :> Get '[JSON] (DLQResponse payload)))))))))
- retryFromDLQ :: mode :- (Capture "id" Int64 :> ("retry" :> PostNoContent))
- deleteDLQ :: mode :- (Capture "id" Int64 :> DeleteNoContent)
- deleteDLQBatch :: mode :- ("batch-delete" :> (ReqBody '[JSON] BatchDeleteRequest :> Post '[JSON] BatchDeleteResponse))
- data ArchiveAPI payload (mode :: k) = ArchiveAPI {
- listArchive :: mode :- (QueryParam "limit" Int :> (QueryParam "offset" Int :> (QueryParam "parent_id" Int64 :> (QueryParam "job_id" Int64 :> (QueryParam "group_key" Text :> (QueryParam "kind" Text :> (QueryParam "completed_after" UTCTime :> (QueryParam "completed_before" UTCTime :> (QueryParam "sort_by" ArchiveSortColumn :> (QueryParam "sort_dir" SortDir :> Get '[JSON] (ArchiveResponse payload)))))))))))
- reEnqueueArchive :: mode :- (Capture "id" Int64 :> ("reenqueue" :> PostNoContent))
- deleteArchive :: mode :- (Capture "id" Int64 :> DeleteNoContent)
- deleteArchiveBatch :: mode :- ("batch-delete" :> (ReqBody '[JSON] BatchDeleteRequest :> Post '[JSON] BatchDeleteResponse))
- data StatsAPI (mode :: k) = StatsAPI {
- getStats :: mode :- Get '[JSON] StatsResponse
- newtype MaintenanceAPI (mode :: k) = MaintenanceAPI {
- runMaintenance :: mode :- Post '[JSON] MaintenanceResponse
- data CronAPI (mode :: k) = CronAPI {
- listSchedules :: mode :- ("schedules" :> (QueryParam "queue" Text :> Get '[JSON] CronSchedulesResponse))
- updateSchedule :: mode :- ("schedules" :> (Capture "name" Text :> (ReqBody '[JSON] CronScheduleUpdate :> Patch '[JSON] CronScheduleView)))
- runSchedule :: mode :- ("schedules" :> (Capture "name" Text :> ("run" :> PostNoContent)))
- data WorkersAPI (mode :: k) = WorkersAPI {
- listWorkers :: mode :- (QueryParam "queue" Text :> (QueryParam "live" Double :> Get '[JSON] WorkersResponse))
- pauseWorker :: mode :- (Capture "id" UUID :> ("pause" :> PostNoContent))
- resumeWorker :: mode :- (Capture "id" UUID :> ("resume" :> PostNoContent))
- data HealthAPI (mode :: k) = HealthAPI {
- getHealth :: mode :- Get '[JSON] HealthResponse
- getLiveness :: mode :- ("live" :> Get '[JSON] LivenessResponse)
- data RateLimitsAPI (mode :: k) = RateLimitsAPI {
- listRateLimits :: mode :- Get '[JSON] RateLimitPoliciesResponse
- listRateLimitBuckets :: mode :- (Capture "prefix" Text :> ("buckets" :> (QueryParam "limit" Int :> (QueryParam "offset" Int :> Get '[JSON] RateLimitBucketsResponse))))
- updateRateLimitPolicy :: mode :- (Capture "prefix" Text :> (ReqBody '[JSON] RateLimitPolicyUpdate :> Patch '[JSON] RateLimitPolicyView))
- resetRateLimitBuckets :: mode :- (Capture "prefix" Text :> ("reset" :> Post '[JSON] RateLimitResetResponse))
- data ConcurrencyAPI (mode :: k) = ConcurrencyAPI {
- listConcurrency :: mode :- Get '[JSON] ConcurrencyPoliciesResponse
- listConcurrencyKeys :: mode :- (Capture "prefix" Text :> ("keys" :> (QueryParam "limit" Int :> (QueryParam "offset" Int :> Get '[JSON] ConcurrencyKeysResponse))))
- updateConcurrencyPolicy :: mode :- (Capture "prefix" Text :> (ReqBody '[JSON] ConcurrencyPolicyUpdate :> Patch '[JSON] ConcurrencyPolicyView))
- reconcileConcurrency :: mode :- ("reconcile" :> Post '[JSON] ConcurrencyReconcileResponse)
- module Arbiter.Servant.Types
Registry
A queue's table name, payload type, and handler result type. A type data
constructor. It takes no promotion tick.
Constructors
| QueueWithResult Symbol Type Type |
Instances
#type Queue (table :: Symbol) payload = 'QueueWithResult table payload ()
A queue whose handlers store no result. A module with its own Queue type
needs import Arbiter.Core hiding (Queue) or a qualified import.
Server
Source #arbiterServer :: forall (registry :: JobPayloadRegistry). BuildServer registry registry => ArbiterServerConfig registry -> ServerT (ArbiterAPI registry) Handler
Complete Arbiter server at /api/v1/...
Source #arbiterApp :: forall (registry :: JobPayloadRegistry). (BuildServer registry registry, HasServer (ArbiterAPI registry) ('[] :: [Type])) => ArbiterServerConfig registry -> Application
Convert to WAI Application. Each QueueWithResult result type needs
FromJSON and ToJSON.
Source #runArbiterAPI :: forall (registry :: JobPayloadRegistry). (BuildServer registry registry, HasServer (ArbiterAPI registry) ('[] :: [Type])) => Port -> ArbiterServerConfig registry -> IO ()
Run the API server on a port.
Source #data ArbiterServerConfig (registry :: JobPayloadRegistry)
Configuration for the API server.
Constructors
| ArbiterServerConfig | |
Fields
| |
Source #initArbiterServer :: forall (registry :: JobPayloadRegistry). Proxy registry -> ByteString -> Text -> IO (ArbiterServerConfig registry)
Create an ArbiterServerConfig with a connection pool of its own. SSE needs the
event-streaming triggers, which runMigrationsForRegistry installs
when enableEventStreaming is set.
Source #defaultQueueStatsCacheTtl :: NominalDiffTime
Default floor between per-queue stats scans.
Source #defaultMaintenanceInterval :: NominalDiffTime
No minimum gap. An explicit maintenance call runs every operation. Concurrent callers exclude each other on the gate.
Source #defaultMaintenanceBucketIdle :: NominalDiffTime
Bucket idle age, matching a worker pool's reaper.
Source #defaultMaintenanceSparseInterval :: NominalDiffTime
Gap the whole-schema operations keep, matching a worker pool's reaper.
Source #defaultMaintenanceTimeout :: NominalDiffTime
Statement timeout for one maintenance operation.
Source #class BuildServer (registry :: JobPayloadRegistry) (reg :: JobPayloadRegistry) where
Builds a registry's per-queue server implementations.
Methods
Source #buildServer :: ArbiterServerConfig registry -> ServerT (RegistryToAPI reg) Handler
Instances
| (RegistryAdmissionPolicies registry, RegistryTables registry) => BuildServer registry ('[] :: [QueueSpec]) Source # | |
Defined in Arbiter.Servant.Server Methods Source #buildServer :: ArbiterServerConfig registry -> ServerT (RegistryToAPI ('[] :: [QueueSpec])) Handler | |
| (BuildServer registry rest, EncodeJobResult (SpecResult spec), JobPayload (SpecPayload spec), KnownSymbol (SpecName spec)) => BuildServer registry (spec ': rest) Source # | |
Defined in Arbiter.Servant.Server Methods Source #buildServer :: ArbiterServerConfig registry -> ServerT (RegistryToAPI (spec ': rest)) Handler | |
API Types
Source #type ArbiterAPI (registry :: JobPayloadRegistry) = "api" :> ("v1" :> RegistryToAPI registry)
Top-level Arbiter API, mounted at /api/v1. The route tree under that
prefix is generated from the registry. See RegistryToAPI for the shape.
Source #type family RegistryToAPI (registry :: JobPayloadRegistry) where ...
A TableAPI route per registry entry, followed by the shared
top-level routes.
Equations
| RegistryToAPI ('[] :: [QueueSpec]) = SharedAPI | |
| RegistryToAPI (spec ': rest) = (SpecName spec :> NamedRoutes (TableAPI (SpecPayload spec) (SpecResult spec) :: Type -> Type)) :<|> RegistryToAPI rest |
Source #data TableAPI payload result (mode :: k)
One queue's routes.
Constructors
| TableAPI | |
Fields
| |
Instances
Source #type SharedAPI = ("queues" :> NamedRoutes (QueuesAPI :: Type -> Type)) :<|> (("maintenance" :> NamedRoutes (MaintenanceAPI :: Type -> Type)) :<|> (("events" :> EventsAPI) :<|> (("cron" :> NamedRoutes (CronAPI :: Type -> Type)) :<|> (("workers" :> NamedRoutes (WorkersAPI :: Type -> Type)) :<|> (("rate-limits" :> NamedRoutes (RateLimitsAPI :: Type -> Type)) :<|> (("concurrency" :> NamedRoutes (ConcurrencyAPI :: Type -> Type)) :<|> ("health" :> NamedRoutes (HealthAPI :: Type -> Type))))))))
Shared top-level routes appended after the per-table routes.
Source #data QueuesAPI (mode :: k)
The queue registry routes.
Constructors
| QueuesAPI | |
Fields
| |
Instances
| Generic (QueuesAPI mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
| |||||
| type Rep (QueuesAPI mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (QueuesAPI mode) = D1 ('MetaData "QueuesAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "QueuesAPI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "listQueues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- Get '[JSON] QueuesResponse)) :*: S1 ('MetaSel ('Just "getAllStats") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("stats" :> Get '[JSON] AllStatsResponse)))) :*: (S1 ('MetaSel ('Just "getDetails") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "queue" Text :> ("details" :> Get '[JSON] (Maybe QueueRow))))) :*: (S1 ('MetaSel ('Just "pauseQueue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "queue" Text :> ("pause" :> PostNoContent)))) :*: S1 ('MetaSel ('Just "resumeQueue") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "queue" Text :> ("resume" :> PostNoContent)))))))) | |||||
Source #data JobsAPI payload result (mode :: k)
One queue's job routes.
Constructors
| JobsAPI | |
Fields
| |
Instances
| Generic (JobsAPI payload result mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
| |||||
| type Rep (JobsAPI payload result mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (JobsAPI payload result mode) = D1 ('MetaData "JobsAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "JobsAPI" 'PrefixI 'True) (((S1 ('MetaSel ('Just "listJobs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (QueryParam "limit" Int :> (QueryParam "offset" Int :> (QueryParam "group_key" Text :> (QueryParam "parent_id" Int64 :> (QueryParam "job_id" Int64 :> (QueryFlag "roots_only" :> (QueryParam "status" JobStatus :> (QueryParam "claimed_by" UUID :> (QueryParam "kind" Text :> (QueryParam "payload" Text :> (QueryParam "rate_limit_prefix" Text :> (QueryParam "concurrency_prefix" Text :> (QueryParam "sort_by" JobSortColumn :> (QueryParam "sort_dir" SortDir :> Get '[JSON] (JobsResponse payload))))))))))))))))) :*: (S1 ('MetaSel ('Just "insertJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (ReqBody '[JSON] (ApiJobWrite payload) :> Post '[JSON] (JobResponse (ApiJob payload))))) :*: S1 ('MetaSel ('Just "insertJobsBatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("batch" :> (ReqBody '[JSON] (BatchInsertRequest payload) :> Post '[JSON] (BatchInsertResponse payload))))))) :*: ((S1 ('MetaSel ('Just "getJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> Get '[JSON] (JobResponse (ApiJobWithStatus payload))))) :*: S1 ('MetaSel ('Just "cancelJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> DeleteNoContent)))) :*: (S1 ('MetaSel ('Just "forceCancelJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("force-cancel" :> PostNoContent)))) :*: S1 ('MetaSel ('Just "ackClaimedJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("ack" :> (ReqBody '[JSON] (AckRequest result) :> PostNoContent)))))))) :*: (((S1 ('MetaSel ('Just "nackClaimedJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("nack" :> (ReqBody '[JSON] JobLease :> PostNoContent))))) :*: S1 ('MetaSel ('Just "extendClaimedJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("extend" :> (ReqBody '[JSON] ExtendRequest :> PostNoContent)))))) :*: (S1 ('MetaSel ('Just "promoteJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("promote" :> PostNoContent)))) :*: S1 ('MetaSel ('Just "moveToDLQ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("move-to-dlq" :> PostNoContent)))))) :*: ((S1 ('MetaSel ('Just "pauseChildren") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("pause-children" :> PostNoContent)))) :*: S1 ('MetaSel ('Just "resumeChildren") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("resume-children" :> PostNoContent))))) :*: (S1 ('MetaSel ('Just "suspendJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("suspend" :> PostNoContent)))) :*: S1 ('MetaSel ('Just "resumeJob") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("resume" :> PostNoContent))))))))) | |||||
Source #data DLQAPI payload (mode :: k)
One queue's DLQ routes.
Constructors
| DLQAPI | |
Fields
| |
Instances
| Generic (DLQAPI payload mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
| |||||
| type Rep (DLQAPI payload mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (DLQAPI payload mode) = D1 ('MetaData "DLQAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DLQAPI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "listDLQ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (QueryParam "limit" Int :> (QueryParam "offset" Int :> (QueryParam "parent_id" Int64 :> (QueryParam "job_id" Int64 :> (QueryParam "group_key" Text :> (QueryParam "kind" Text :> (QueryParam "sort_by" DLQSortColumn :> (QueryParam "sort_dir" SortDir :> Get '[JSON] (DLQResponse payload))))))))))) :*: S1 ('MetaSel ('Just "retryFromDLQ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("retry" :> PostNoContent))))) :*: (S1 ('MetaSel ('Just "deleteDLQ") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> DeleteNoContent))) :*: S1 ('MetaSel ('Just "deleteDLQBatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("batch-delete" :> (ReqBody '[JSON] BatchDeleteRequest :> Post '[JSON] BatchDeleteResponse))))))) | |||||
Source #data ArchiveAPI payload (mode :: k)
One queue's archive routes.
Constructors
| ArchiveAPI | |
Fields
| |
Instances
| Generic (ArchiveAPI payload mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
Methods #from :: ArchiveAPI payload mode -> Rep (ArchiveAPI payload mode) x #to :: Rep (ArchiveAPI payload mode) x -> ArchiveAPI payload mode | |||||
| type Rep (ArchiveAPI payload mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (ArchiveAPI payload mode) = D1 ('MetaData "ArchiveAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ArchiveAPI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "listArchive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (QueryParam "limit" Int :> (QueryParam "offset" Int :> (QueryParam "parent_id" Int64 :> (QueryParam "job_id" Int64 :> (QueryParam "group_key" Text :> (QueryParam "kind" Text :> (QueryParam "completed_after" UTCTime :> (QueryParam "completed_before" UTCTime :> (QueryParam "sort_by" ArchiveSortColumn :> (QueryParam "sort_dir" SortDir :> Get '[JSON] (ArchiveResponse payload))))))))))))) :*: S1 ('MetaSel ('Just "reEnqueueArchive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> ("reenqueue" :> PostNoContent))))) :*: (S1 ('MetaSel ('Just "deleteArchive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" Int64 :> DeleteNoContent))) :*: S1 ('MetaSel ('Just "deleteArchiveBatch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("batch-delete" :> (ReqBody '[JSON] BatchDeleteRequest :> Post '[JSON] BatchDeleteResponse))))))) | |||||
Source #data StatsAPI (mode :: k)
One queue's stats route.
Instances
| Generic (StatsAPI mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
| |||||
| type Rep (StatsAPI mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (StatsAPI mode) = D1 ('MetaData "StatsAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "StatsAPI" 'PrefixI 'True) (S1 ('MetaSel ('Just "getStats") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- Get '[JSON] StatsResponse)))) | |||||
Source #newtype MaintenanceAPI (mode :: k)
Schema-wide maintenance. A running worker pool does the same work.
Constructors
| MaintenanceAPI | |
Fields
| |
Instances
| Generic (MaintenanceAPI mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
Methods #from :: MaintenanceAPI mode -> Rep (MaintenanceAPI mode) x #to :: Rep (MaintenanceAPI mode) x -> MaintenanceAPI mode | |||||
| type Rep (MaintenanceAPI mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (MaintenanceAPI mode) = D1 ('MetaData "MaintenanceAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'True) (C1 ('MetaCons "MaintenanceAPI" 'PrefixI 'True) (S1 ('MetaSel ('Just "runMaintenance") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- Post '[JSON] MaintenanceResponse)))) | |||||
Source #data CronAPI (mode :: k)
The cron schedule routes.
Constructors
| CronAPI | |
Fields
| |
Instances
| Generic (CronAPI mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
| |||||
| type Rep (CronAPI mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (CronAPI mode) = D1 ('MetaData "CronAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "CronAPI" 'PrefixI 'True) (S1 ('MetaSel ('Just "listSchedules") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("schedules" :> (QueryParam "queue" Text :> Get '[JSON] CronSchedulesResponse)))) :*: (S1 ('MetaSel ('Just "updateSchedule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("schedules" :> (Capture "name" Text :> (ReqBody '[JSON] CronScheduleUpdate :> Patch '[JSON] CronScheduleView))))) :*: S1 ('MetaSel ('Just "runSchedule") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("schedules" :> (Capture "name" Text :> ("run" :> PostNoContent)))))))) | |||||
Source #data WorkersAPI (mode :: k)
The worker registry routes.
Constructors
| WorkersAPI | |
Fields
| |
Instances
| Generic (WorkersAPI mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
Methods #from :: WorkersAPI mode -> Rep (WorkersAPI mode) x #to :: Rep (WorkersAPI mode) x -> WorkersAPI mode | |||||
| type Rep (WorkersAPI mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (WorkersAPI mode) = D1 ('MetaData "WorkersAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "WorkersAPI" 'PrefixI 'True) (S1 ('MetaSel ('Just "listWorkers") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (QueryParam "queue" Text :> (QueryParam "live" Double :> Get '[JSON] WorkersResponse)))) :*: (S1 ('MetaSel ('Just "pauseWorker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" UUID :> ("pause" :> PostNoContent)))) :*: S1 ('MetaSel ('Just "resumeWorker") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "id" UUID :> ("resume" :> PostNoContent))))))) | |||||
Source #data HealthAPI (mode :: k)
Liveness and readiness.
Constructors
| HealthAPI | |
Fields
| |
Instances
| Generic (HealthAPI mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
| |||||
| type Rep (HealthAPI mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (HealthAPI mode) = D1 ('MetaData "HealthAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "HealthAPI" 'PrefixI 'True) (S1 ('MetaSel ('Just "getHealth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- Get '[JSON] HealthResponse)) :*: S1 ('MetaSel ('Just "getLiveness") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("live" :> Get '[JSON] LivenessResponse))))) | |||||
Source #data RateLimitsAPI (mode :: k)
Rate limits API routes, schema-wide.
Constructors
| RateLimitsAPI | |
Fields
| |
Instances
| Generic (RateLimitsAPI mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
Methods #from :: RateLimitsAPI mode -> Rep (RateLimitsAPI mode) x #to :: Rep (RateLimitsAPI mode) x -> RateLimitsAPI mode | |||||
| type Rep (RateLimitsAPI mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (RateLimitsAPI mode) = D1 ('MetaData "RateLimitsAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "RateLimitsAPI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "listRateLimits") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- Get '[JSON] RateLimitPoliciesResponse)) :*: S1 ('MetaSel ('Just "listRateLimitBuckets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "prefix" Text :> ("buckets" :> (QueryParam "limit" Int :> (QueryParam "offset" Int :> Get '[JSON] RateLimitBucketsResponse))))))) :*: (S1 ('MetaSel ('Just "updateRateLimitPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "prefix" Text :> (ReqBody '[JSON] RateLimitPolicyUpdate :> Patch '[JSON] RateLimitPolicyView)))) :*: S1 ('MetaSel ('Just "resetRateLimitBuckets") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "prefix" Text :> ("reset" :> Post '[JSON] RateLimitResetResponse))))))) | |||||
Source #data ConcurrencyAPI (mode :: k)
Concurrency API routes, schema-wide.
Constructors
| ConcurrencyAPI | |
Fields
| |
Instances
| Generic (ConcurrencyAPI mode) Source # | |||||
Defined in Arbiter.Servant.API Associated Types
Methods #from :: ConcurrencyAPI mode -> Rep (ConcurrencyAPI mode) x #to :: Rep (ConcurrencyAPI mode) x -> ConcurrencyAPI mode | |||||
| type Rep (ConcurrencyAPI mode) Source # | |||||
Defined in Arbiter.Servant.API type Rep (ConcurrencyAPI mode) = D1 ('MetaData "ConcurrencyAPI" "Arbiter.Servant.API" "arbiter-servant-0.1.0.0-inplace" 'False) (C1 ('MetaCons "ConcurrencyAPI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "listConcurrency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- Get '[JSON] ConcurrencyPoliciesResponse)) :*: S1 ('MetaSel ('Just "listConcurrencyKeys") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "prefix" Text :> ("keys" :> (QueryParam "limit" Int :> (QueryParam "offset" Int :> Get '[JSON] ConcurrencyKeysResponse))))))) :*: (S1 ('MetaSel ('Just "updateConcurrencyPolicy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- (Capture "prefix" Text :> (ReqBody '[JSON] ConcurrencyPolicyUpdate :> Patch '[JSON] ConcurrencyPolicyView)))) :*: S1 ('MetaSel ('Just "reconcileConcurrency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (mode :- ("reconcile" :> Post '[JSON] ConcurrencyReconcileResponse)))))) | |||||
Request and response types
module Arbiter.Servant.Types