| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Origin
Description
Origin coordinates, limits, and credential posture for registry data-plane reads.
Synopsis
- data OriginClient = OriginClient {
- ocBaseRequest :: BaseRequest
- ocClient :: ExchangeClient
- ocToken :: Maybe ClientCredential
- ocLimits :: Limits
- ocPublicControl :: Maybe PublicControl
- ocReadKind :: Maybe PublicReadKind
- ocChargeSelectedRead :: Int -> IO ()
- ocChargeFullReadWorkspace :: Int -> IO ()
- ocChargeFullRead :: Int -> IO ()
- originClient :: Limits -> ExchangeClient -> RegistryUrl -> Maybe ClientCredential -> OriginClient
- ocBaseUrl :: OriginClient -> RegistryUrl
- originBaseUrl :: OriginClient -> Text
- data OriginFor posture
- data Public
- data Private
- anonymousOrigin :: Limits -> ExchangeClient -> BaseRequest -> OriginFor Public
- perCallerOrigin :: Limits -> ExchangeClient -> BaseRequest -> Maybe ClientCredential -> OriginFor Private
- originClientOf :: OriginFor posture -> OriginClient
- chargingFullReads :: (Int -> IO ()) -> OriginFor posture -> OriginFor posture
- chargingFullReadWorkspace :: (Int -> IO ()) -> OriginFor posture -> OriginFor posture
- chargingSelectedMetadata :: (Int -> IO ()) -> OriginFor posture -> OriginFor posture
- chargingNativeReads :: ChargeFactors -> (Int -> IO ()) -> OriginFor posture -> IO (OriginFor posture)
- controlPublicOrigin :: PublicControl -> Maybe PublicReadKind -> OriginFor Public -> OriginFor Public
Documentation
data OriginClient Source #
One origin's coordinates, credential posture, and response bound.
Constructors
| OriginClient | |
Fields
| |
originClient :: Limits -> ExchangeClient -> RegistryUrl -> Maybe ClientCredential -> OriginClient Source #
Build an origin with caller-supplied limits, transport, and credential posture.
ocBaseUrl :: OriginClient -> RegistryUrl Source #
The origin's base URL, read from its one parse so the two cannot disagree.
originBaseUrl :: OriginClient -> Text Source #
The origin's base URL as text.
Credential posture, carried in the type
data OriginFor posture Source #
Retain credential posture in the type. The nominal role prevents retagging with coerce.
anonymousOrigin :: Limits -> ExchangeClient -> BaseRequest -> OriginFor Public Source #
An origin dialled with no credential, so no caller's authorisation scopes what it reads.
perCallerOrigin :: Limits -> ExchangeClient -> BaseRequest -> Maybe ClientCredential -> OriginFor Private Source #
An origin presenting one caller's credential, so what it reads is scoped to that caller.
originClientOf :: OriginFor posture -> OriginClient Source #
The plain record behind a tagged origin, for the operations that take any origin.
chargingFullReads :: (Int -> IO ()) -> OriginFor posture -> OriginFor posture Source #
The same origin, whose full reads hand the payer each chunk's own charge, never a running total.
A high-water payer must be wrapped in accumulatingCharge.
chargingFullReadWorkspace :: (Int -> IO ()) -> OriginFor posture -> OriginFor posture Source #
Bind a full reader's absolute workspace without replacing its incremental source charge.
chargingSelectedMetadata :: (Int -> IO ()) -> OriginFor posture -> OriginFor posture Source #
Bind an absolute workspace reservation for native selected metadata reads.
chargingNativeReads :: ChargeFactors -> (Int -> IO ()) -> OriginFor posture -> IO (OriginFor posture) Source #
Bind one high-water payer to a native read: the selected workspace at face value, and the running total of the incremental full-read charges at the full-read factor.
controlPublicOrigin :: PublicControl -> Maybe PublicReadKind -> OriginFor Public -> OriginFor Public Source #
Control anonymous public reads, optionally assigning one kind to both metadata operations.