ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Config.Types

Synopsis

Documentation

newtype Url Source #

Constructors

Url Text 

Instances

Instances details
Show Url Source # 
Instance details

Defined in Ecluse.Config.Types

Methods

showsPrec :: Int -> Url -> ShowS #

show :: Url -> String #

showList :: [Url] -> ShowS #

Eq Url Source # 
Instance details

Defined in Ecluse.Config.Types

Methods

(==) :: Url -> Url -> Bool #

(/=) :: Url -> Url -> Bool #

Ord Url Source # 
Instance details

Defined in Ecluse.Config.Types

Methods

compare :: Url -> Url -> Ordering #

(<) :: Url -> Url -> Bool #

(<=) :: Url -> Url -> Bool #

(>) :: Url -> Url -> Bool #

(>=) :: Url -> Url -> Bool #

max :: Url -> Url -> Url #

min :: Url -> Url -> Url #

data MirrorCredential Source #

The mirror-write credential, derived from the mirror-target URL so a token can never be paired with an endpoint it was not minted for. A CodeArtifact endpoint encodes its whole identity in its host, so that identity is parsed straight from the URL; any other host is written with an operator-supplied static bearer. The choice is made once, at config load (resolveMirrorCredential), and carried here so the pairing is correct by construction.

Constructors

MirrorCodeArtifact CodeArtifactConfig

A CodeArtifact mirror target: the mint identity parsed from its host.

MirrorStatic Secret

Any other mirror target: an operator-supplied static write token.

data MountConfig Source #

Constructors

MountConfig 

Fields

data AppConfig Source #

The resolved application configuration, one sub-record per document group so a field's home says what it governs (the document schema and this type mirror each other one to one).

Instances

Instances details
FromJSON AppConfig Source # 
Instance details

Defined in Ecluse.Config.Aeson

Show AppConfig Source # 
Instance details

Defined in Ecluse.Config.Types

Eq AppConfig Source # 
Instance details

Defined in Ecluse.Config.Types

data ServerSettings Source #

The server group: the inbound edge Écluse itself presents.

Constructors

ServerSettings 

Fields

Instances

Instances details
Show ServerSettings Source # 
Instance details

Defined in Ecluse.Config.Types

Eq ServerSettings Source # 
Instance details

Defined in Ecluse.Config.Types

data QueueSettings Source #

The queue group: the mirror queue's destination and the in-memory rollover's depth cap. The backend is derived from the URL's shape (Ecluse.Config.QueueTarget), never named here.

Constructors

QueueSettings 

Fields

Instances

Instances details
Show QueueSettings Source # 
Instance details

Defined in Ecluse.Config.Types

Eq QueueSettings Source # 
Instance details

Defined in Ecluse.Config.Types

data LimitsSettings Source #

The limits group: the hostile-input bounds. The structural counts are pinned policy defaults; the byte-valued caps are computed from the memory plan when unset (Ecluse.Composition.MemoryPlan), a configured value always winning.

Constructors

LimitsSettings 

Fields

Instances

Instances details
Show LimitsSettings Source # 
Instance details

Defined in Ecluse.Config.Types

Eq LimitsSettings Source # 
Instance details

Defined in Ecluse.Config.Types

data CacheSettings Source #

The cache group: the metadata cache's TTL and its computed-by-default bounds.

Constructors

CacheSettings 

Fields

Instances

Instances details
Show CacheSettings Source # 
Instance details

Defined in Ecluse.Config.Types

Eq CacheSettings Source # 
Instance details

Defined in Ecluse.Config.Types

data IntegritySettings Source #

The integrity group: the global integrity floors and divergence policy (minTrusted and divergencePolicy refinable per mount).

Constructors

IntegritySettings 

Fields

newtype EgressSettings Source #

The egress group: the operator's additions to the blocked target ranges.

Instances

Instances details
Show EgressSettings Source # 
Instance details

Defined in Ecluse.Config.Types

Eq EgressSettings Source # 
Instance details

Defined in Ecluse.Config.Types

data RuntimeSettings Source #

The runtime group: the process-sizing overrides. Every field is optional; unset, each is computed from the runtime posture (cgroups, RTS, file-descriptor limit) with its provenance boot-logged.

data ObservabilitySettings Source #

The observability group: log shape and telemetry switch.

Constructors

ObservabilitySettings 

Fields

data MountRegistries Source #

Constructors

MountRegistries 

Fields

data MountMode Source #

Whether a mount mirrors, derived from its declared endpoints: a declared mirrorTarget makes the mount Mirrored (and its private upstream is then required, so the mirror can be read back), an absent one makes it ServeOnly (never writes anywhere; the private upstream is optional, and a mount with neither is the pure public gate). The coupling is structural, so a mirrored mount without a readable private leg is unrepresentable.

Constructors

Mirrored MirroredLegs

The mount mirrors admitted public artifacts; both legs are required.

ServeOnly (Maybe RegistryUrl)

The mount never writes; the optional private upstream is still merged when present.

Instances

Instances details
Show MountMode Source # 
Instance details

Defined in Ecluse.Config.Types

Eq MountMode Source # 
Instance details

Defined in Ecluse.Config.Types

data MirroredLegs Source #

A mirrored mount's two required halves: the readable private upstream and the mirror target married to its derived write credential.

Constructors

MirroredLegs 

Fields

Instances

Instances details
Show MirroredLegs Source # 
Instance details

Defined in Ecluse.Config.Types

Eq MirroredLegs Source # 
Instance details

Defined in Ecluse.Config.Types

regPrivateUpstream :: MountRegistries -> Maybe RegistryUrl Source #

The mount's private upstream, when it has one: total over both modes, so call sites read as before while the compiler makes them face the serve-only absence.

regMirrorTarget :: MountRegistries -> Maybe MirrorTarget Source #

The mount's mirror target (with its derived credential), when it mirrors.

data MirrorTarget Source #

Constructors

MirrorTarget 

Fields

Instances

Instances details
Show MirrorTarget Source # 
Instance details

Defined in Ecluse.Config.Types

Eq MirrorTarget Source # 
Instance details

Defined in Ecluse.Config.Types

data Mount Source #

Constructors

Mount 

Fields

Instances

Instances details
Show Mount Source # 
Instance details

Defined in Ecluse.Config.Types

Methods

showsPrec :: Int -> Mount -> ShowS #

show :: Mount -> String #

showList :: [Mount] -> ShowS #

Eq Mount Source # 
Instance details

Defined in Ecluse.Config.Types

Methods

(==) :: Mount -> Mount -> Bool #

(/=) :: Mount -> Mount -> Bool #

type MountMap = Map Ecosystem Mount Source #

data Config Source #

Constructors

Config 

Instances

Instances details
Show Config Source # 
Instance details

Defined in Ecluse.Config.Types

Eq Config Source # 
Instance details

Defined in Ecluse.Config.Types

Methods

(==) :: Config -> Config -> Bool #

(/=) :: Config -> Config -> Bool #

data ConfigError Source #

Constructors

ParseError Text 
PolicyErrors [PolicyError] 
PublicUrlRequired

A mount is active but server.publicUrl is unset. Served artifact URLs must be rewritten against the proxy's own externally-reachable base URL; a relative dist.tarball reads to the npm CLI as a file: path and every install fails, so the omission is refused at boot rather than discovered client by client. Host-header derivation is deliberately not offered (a spoofed header would poison every shared-cache entry with an attacker-chosen artifact URL).

MountMissingPrivateUpstream Ecosystem

A mirrored mount (one that declares a mirrorTarget) does not define its private upstream. The mirror write must be readable back through the private leg, so a mirrored mount without one is refused; a serve-only mount (no mirrorTarget) never raises this.

MirrorSettingWithoutWrite Ecosystem Text

A serve-only mount (no mirrorTarget declared) carries a mirror-write setting anyway. A write credential or token duration on a mount that never writes signals a misunderstanding (most likely a missing mirrorTarget), so it is refused per offending key rather than silently ignored. Carries the mount's ecosystem and the offending document key.

MirrorCredentialTokenMissing Ecosystem

An active mount's mirror target is not a CodeArtifact endpoint (whose write token would be minted), so it needs an explicit static write token, and none was supplied. Carries the mount's ecosystem.

MirrorCredentialConflict Ecosystem

An active mount's mirror target is a CodeArtifact endpoint (its write token is minted automatically from the host identity) yet a static write token was also supplied. Refused so the two credential sources can never silently contend. Carries the mount's ecosystem.

Instances

Instances details
Show ConfigError Source # 
Instance details

Defined in Ecluse.Config.Types

Eq ConfigError Source # 
Instance details

Defined in Ecluse.Config.Types