ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Server.Pipeline

Description

The proxy's data-plane entry point: the handlers for packument merges (GET /{pkg}), artifact relays (GET /{pkg}/-/{file}.tgz), and first-party publishes (PUT /{pkg}). An ecosystem's route table names them one module at a time, so nothing but its own spec imports this hub.

The handlers name no ecosystem. A registry's metadata client, packument assembly, and artifact-request formation reach them as injected capabilities on PackumentDeps, so a router maps its own routes onto whichever handlers apply and names its own actions for the rest.

Synopsis

The packument handler

servePackument :: PackumentReplies response -> PackageName -> Request -> (response -> IO ResponseReceived) -> Handler ResponseReceived Source #

Serve merged metadata while retaining private access authority and package identity checks.

headPackument :: PackumentReplies response -> PackageName -> Request -> (response -> IO ResponseReceived) -> Handler ResponseReceived Source #

Serve the packument's GET status and headers without its body.

The tarball handler

serveTarball :: TarballReplies response -> PackageName -> Version -> Filename -> Request -> (response -> IO ResponseReceived) -> Handler ResponseReceived Source #

Serve an artifact with the caller's credential confined to the private origin.

headTarball :: TarballReplies response -> PackageName -> Version -> Filename -> Request -> (response -> IO ResponseReceived) -> Handler ResponseReceived Source #

Probe an artifact with HEAD through the same policy as GET, without pumping upstream bytes.

The first-party publish handler

servePublish :: PublishReplies response -> PackageName -> Request -> (response -> IO ResponseReceived) -> Handler ResponseReceived Source #

Relay a configured first-party publish after authentication and body guards.