ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Composition.Maintenance

Description

Build role-specific maintenance, observations and upstream probes from cleared backends.

Synopsis

The environment-dependent half

data StorePorts Source #

Per-target tracing and authentication, resolved before the store handles are built.

Constructors

StorePorts 

Fields

  • spTracing :: TracingPort

    The tracing port the manifest read is bracketed by.

  • spCredential :: Maybe CredentialProvider

    The credential for this exact target. An anonymous protocol observation holds none.

  • spUserAgent :: ByteString

    The precomputed identity shared by this store's registry requests.

  • spDeadlines :: Deadlines

    The process's sweeper, which bounds this store's registry requests.

  • spBudget :: BudgetPorts

    What this store's requests are counted and paced through.

data BudgetPorts Source #

Capacity declarations and request gates resolved before store construction.

Constructors

BudgetPorts 

Fields

storeScope :: RegistryUrl -> QuotaScope Source #

Default to one capacity pool per authority, shared by paths on that host.

resolvedBudget :: BudgetPorts -> RegistryUrl -> StoreBudget -> StoreBudget Source #

Apply declared capacity over backend defaults, deriving any remaining quota from the sweep pace.

type BuildUpstreamProbe = Ecosystem -> PrivateEndpoint -> IO UpstreamSafety Source #

Build the probe for one private upstream under the role's own authority.

data StoreBuilds Source #

Role-specific constructors. Preview construction never creates deletion handles.

Constructors

StoreBuilds 

Fields

storeBuilds :: StoreBuilds Source #

The shipped builds.

buildStoreMaintenance :: BuildStoreMaintenance Source #

Build maintenance using store-local metadata reads and backend-owned control credentials.

buildStoreObservation :: BuildStoreObservation Source #

Build the cleared backend's observation capability without constructing deletion handles.

buildUpstreamProbe :: BuildUpstreamProbe Source #

Probe the declared backend with the role's ambient identity, never a caller's credential.

planStoreMaintenance :: (StorePorts -> Limits -> ClearedBackend -> IO store) -> TracingPort -> Deadlines -> ByteString -> BudgetPorts -> CredentialProviders -> Limits -> Map Ecosystem ClearedBackend -> IO (Either [BootError] (Map Ecosystem store)) Source #

Build each cleared store and collect all construction refusals before returning.

planStoreMaintenanceFor :: CredentialTarget -> (StorePorts -> Limits -> ClearedBackend -> IO store) -> TracingPort -> Deadlines -> ByteString -> BudgetPorts -> CredentialProviders -> Limits -> Map Ecosystem ClearedBackend -> IO (Either [BootError] (Map Ecosystem store)) Source #

Plan a target slot with its own credentials and accumulate all backend construction refusals.

What the private upstream answers about public content

readUpstreamSafety :: [(Ecosystem, IO UpstreamSafety)] -> IO ([Advisory], Either [BootError] ()) Source #

Collect probe answers and refuse the affected mounts when a probe throws.

upstreamFindings :: [(Ecosystem, UpstreamSafety)] -> ([Advisory], Either [BootError] ()) Source #

Refuse unsafe upstreams, advise on undecidable ones, and accept safe ones.