@backblaze-labs/b2-sdk - v0.1.0
    Preparing search index...

    Class UploadUrlPool

    Manages a pool of reusable upload URLs keyed by bucket ID or file ID. URLs are checked out before an upload, checked back in on success, and evicted on error so they are not reused.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Return a still-valid upload URL to the pool for future reuse.

      Parameters

      • key: string

        The bucket ID or file ID the entry belongs to.

      • entry: UploadUrlEntry

        The upload URL entry to return to the pool.

      Returns void

    • Take an upload URL from the pool, or return null if none are available.

      Parameters

      • key: string

        The bucket ID or file ID to look up.

      Returns UploadUrlEntry | null

      An upload URL entry, or null if the pool is empty for the given key.

    • Remove a specific upload URL from the pool (e.g. after an upload error).

      Parameters

      • key: string

        The bucket ID or file ID the entry belongs to.

      • entry: UploadUrlEntry

        The failed upload URL entry to remove.

      Returns void