Setu-TS
    Preparing search index...

    Class AzureBlobProvider

    Azure Blob storage provider.

    Supports native streaming via download().readableStreamBody async-iterated into a web ReadableStream.

    0.1.0

    Implements

    • StorageProvider
    Index
    • Parameters

      • Optionaloptions: AzureBlobProviderOptions

        Azure connection/injection options

      • now: () => number = ...

        Wall-clock source (epoch ms) for SAS expiry. Injected by createProvider as runtime.now() (the only sanctioned clock outside packages/runtime). Defaults to () => 0 for direct construction.

      Returns AzureBlobProvider

    isHealthy?: () => Promise<boolean>

    M70c: delegates to the injected client's optional isHealthy?() (the real adapter calls the container client's exists()). Assigned in connect() only when the client provides the member; a client that omits it is unknown, and the indicator reads absence (not false) as that.

    0.1.0

    • Retrieves an object from Azure Blob Storage; null when absent.

      Parameters

      • path: string

        Object key

      Returns Promise<Uint8Array<ArrayBufferLike> | null>

      The object bytes, or null

    • Creates a SAS URL for an Azure Blob.

      Parameters

      • path: string

        Object key

      • options: { expiresIn: number }

        Expiry in seconds

      Returns Promise<string>

      The SAS URL

      When the provider is not connected, or when the resolved client has no account key to sign with — both as REJECTIONS, never a synchronous throw, so a caller using .catch() sees them.

    • Native stream download — adapts Azure readableStreamBody (Node Readable) into a web ReadableStream via async iteration.

      Cancellation-safe: the stream's cancel hook releases the iterator and destroys the underlying request, so a consumer cancelling mid-download neither leaks the connection nor crashes the process (previously the eager drain kept flowing after a cancel and the next chunk enqueued into the closed controller as an uncaught TypeError). Still an EAGER drain by documented contract — see provider-stream.ts and the README's per-provider table.

      Parameters

      • path: string

        Object key

      Returns Promise<ReadableStream<Uint8Array<ArrayBufferLike>> | null>

      A ReadableStream, or null if absent

    • Stores an object in Azure Blob Storage, recording any content type and user metadata on the blob so a SAS URL serves it under the right type.

      Azure carries the content type inside blobHTTPHeaders rather than beside the metadata, so the two land in different places on the same call.

      Parameters

      • path: string

        Object key

      • data: Uint8Array

        Object bytes

      • Optionaloptions: PutObjectOptions

        Object attributes to record with the bytes

      Returns Promise<void>