arbiter-core-0.1.0.0
arbiter-core
Safe HaskellNone
LanguageGHC2024

Arbiter.Core.Worker

Description

Internal to the arbiter packages. Not covered by the PVP.

Types and DDL for the arbiter_workers table.

Synopsis

Documentation

data WorkerRowSource #

A row in the worker registry. One row per running worker.

Constructors

WorkerRow 

Fields

Instances

Instances details
FromJSON WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

ToJSON WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

Eq WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

Generic WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

Show WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

type Rep WorkerRow Source # 
Instance details

Defined in Arbiter.Core.Worker

data WorkerHealthSource #

Heartbeat-derived health of a worker. Independent of its paused flag.

Constructors

Live

The heartbeat is fresh and the worker is not shutting down.

Stale

The last heartbeat is older than the worker's stale threshold.

Draining

The heartbeat is fresh and the worker is shutting down.

Instances

Instances details
FromJSON WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

ToJSON WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

Eq WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

Bounded WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

Enum WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

Generic WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

Associated Types

type Rep WorkerHealth 
Instance details

Defined in Arbiter.Core.Worker

type Rep WorkerHealth = D1 ('MetaData "WorkerHealth" "Arbiter.Core.Worker" "arbiter-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Live" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Stale" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Draining" 'PrefixI 'False) (U1 :: Type -> Type)))
Show WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

type Rep WorkerHealth Source # 
Instance details

Defined in Arbiter.Core.Worker

type Rep WorkerHealth = D1 ('MetaData "WorkerHealth" "Arbiter.Core.Worker" "arbiter-core-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Live" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Stale" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Draining" 'PrefixI 'False) (U1 :: Type -> Type)))

workerHealthToText :: WorkerHealth -> TextSource #

The health SQL token of a WorkerHealth.

workerHealthFromText :: Text -> Either Text WorkerHealthSource #

Decode the health SQL token into a WorkerHealth.

arbiterWorkersTable :: SchemaName -> TextSource #

Qualified table name for the arbiter_workers table.

arbiterWorkersTableName :: TextSource #

Bare name of the workers table, for catalog lookups by relname.

createWorkersTableSQL :: SchemaName -> TextSource #

DDL for the arbiter_workers table.