ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Composition.Types

Description

The roles a boot runs under: which command started the process, which half of the mirror pipeline that process runs, and which registry role its validation rules apply under.

The command line writes these and the boot pipeline reads them, so they live in a module neither side owns.

Synopsis

The booting command

data BootRole Source #

What a booting command does with the configured mirror targets. It decides each rule's severity and which witnesses the boot's vetting pass issues.

Constructors

BootMirrorPipeline MirrorRole

ecluse proxy, ecluse proxy --no-worker and ecluse mirror: they write.

BootStorePruner

ecluse dredger: it permanently deletes.

BootStorePreview

ecluse dredger --dry-run: it reads every mirror target and changes none of them.

BootWithoutPipeline

ecluse pilot and ecluse check-config: they neither mirror nor delete.

Instances

Instances details
Generic BootRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Associated Types

type Rep BootRole 
Instance details

Defined in Ecluse.Composition.Types

type Rep BootRole = D1 ('MetaData "BootRole" "Ecluse.Composition.Types" "ecluse-0.4.0-inplace" 'False) ((C1 ('MetaCons "BootMirrorPipeline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MirrorRole)) :+: C1 ('MetaCons "BootStorePruner" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BootStorePreview" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BootWithoutPipeline" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: BootRole -> Rep BootRole x #

to :: Rep BootRole x -> BootRole #

Show BootRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Eq BootRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Universe BootRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Methods

universe :: [BootRole] #

type Rep BootRole Source # 
Instance details

Defined in Ecluse.Composition.Types

type Rep BootRole = D1 ('MetaData "BootRole" "Ecluse.Composition.Types" "ecluse-0.4.0-inplace" 'False) ((C1 ('MetaCons "BootMirrorPipeline" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MirrorRole)) :+: C1 ('MetaCons "BootStorePruner" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "BootStorePreview" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BootWithoutPipeline" 'PrefixI 'False) (U1 :: Type -> Type)))

everyBootRole :: [BootRole] Source #

Every role a boot runs under, the mirror-pipeline halves first. ecluse check-config picks no subcommand, so it runs the pure pass once per entry rather than once.

bootInvocation :: BootRole -> Text Source #

How an operator spells a booting command, for a report that names the role a refusal belongs to.

registryRoleOf :: BootRole -> RegistryRole Source #

The registry role a command's rules apply under. Only the Dredger deletes.

pipelineRoleOf :: BootRole -> Maybe MirrorRole Source #

The mirror-pipeline half a command runs, Nothing where it runs none.

The roles it decomposes into

data MirrorRole Source #

The mirror-pipeline halves one process runs, selected by the command line.

Constructors

ServeAndMirror

ecluse proxy: the front door and the mirror worker in one process.

ServeOnly

ecluse proxy --no-worker: the front door alone, still enqueueing.

MirrorOnly

ecluse mirror: the worker alone, serving only its health probes.

Instances

Instances details
Generic MirrorRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Associated Types

type Rep MirrorRole 
Instance details

Defined in Ecluse.Composition.Types

type Rep MirrorRole = D1 ('MetaData "MirrorRole" "Ecluse.Composition.Types" "ecluse-0.4.0-inplace" 'False) (C1 ('MetaCons "ServeAndMirror" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ServeOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MirrorOnly" 'PrefixI 'False) (U1 :: Type -> Type)))
Show MirrorRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Eq MirrorRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Universe MirrorRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Methods

universe :: [MirrorRole] #

type Rep MirrorRole Source # 
Instance details

Defined in Ecluse.Composition.Types

type Rep MirrorRole = D1 ('MetaData "MirrorRole" "Ecluse.Composition.Types" "ecluse-0.4.0-inplace" 'False) (C1 ('MetaCons "ServeAndMirror" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ServeOnly" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MirrorOnly" 'PrefixI 'False) (U1 :: Type -> Type)))

roleInvocation :: MirrorRole -> Text Source #

How an operator spells this role on the command line, for the boot refusal's message.

data RegistryRole Source #

The registry role a vetting pass vets for. The proxy and the mirror worker write to a mount's mirror target, and the Dredger deletes from it, which is what makes a shared store unsafe.

Constructors

MirrorWriter

ecluse proxy and ecluse mirror: they read and write, and delete nothing.

MirrorPruner

ecluse dredger: it permanently deletes from every mount's mirror target.

MirrorPreviewer

ecluse dredger --dry-run: same checks, holding nothing that writes to a target.

Instances

Instances details
Show RegistryRole Source # 
Instance details

Defined in Ecluse.Composition.Types

Eq RegistryRole Source # 
Instance details

Defined in Ecluse.Composition.Types