Module: HLS::Storage

Defined in:
lib/hls/storage.rb

Overview

The storage protocol the gem talks through to put/get objects and produce signed URLs. Profile classes attach an instance of one of these to themselves via ‘storage`.

# Protocol

storage.signing_ttl     -> Integer (default TTL for presigned URLs)
storage.object(key)     -> Object  (no I/O)

object.get              -> response with .body (IO-like)
object.put(body:, content_type:, cache_control:) -> response with .etag
object.presigned_url(:get, expires_in:) -> URL string

# Built-in adapters

  • ‘HLS::Storage::S3` — default. Wraps an `Aws::S3::Bucket`.

  • ‘HLS::Storage::Memory` — in-process bucket for tests. Signed URLs are non-browser `memory://` strings but round-trip through a Manifest so you can assert on them.

Defined Under Namespace

Classes: Memory, S3