Rindle.Capability (Rindle v0.4.5)

Copy Markdown View Source

Aggregates Rindle runtime capability surfaces for ops/doctor consumers.

report/0 is the shared capability view consumed by operator-facing doctor checks.

Security invariant 14

report/0 returns booleans and module names — NEVER actual configuration values. signed_playback_configured? is a presence check on the Rindle.Streaming.Provider.Mux config keys; it does NOT echo the keys back. The function uses Application.get_env/2, which returns [] when nothing is configured, so it does not crash when the optional :mux dep is absent.

Summary

Types

Capability report shape consumed by runtime and doctor checks.

Functions

Returns the subset of profiles that select Rindle.Storage.GCS as their storage adapter.

Returns the subset of profiles that opt into the :streaming delivery key.

Returns the configured subset of profiles expected to mount TusPlug.

Types

report()

@type report() :: %{
  storage: %{required(module()) => [atom()]},
  processor: %{required(module()) => [atom()]},
  streaming: %{
    providers: %{required(module()) => [atom()]},
    signed_playback_configured?: boolean(),
    configured_profiles: [module()]
  }
}

Capability report shape consumed by runtime and doctor checks.

Functions

configured_gcs_profiles(profiles)

@spec configured_gcs_profiles([module()]) :: [module()]

Returns the subset of profiles that select Rindle.Storage.GCS as their storage adapter.

Public seam used by mix rindle.doctor's GCS checks as the single source of truth for "is this profile GCS-enabled?". Mirrors configured_streaming_profiles/1 — both delegate from runtime_checks.ex so the doctor module never inlines profile-filter logic.

configured_streaming_profiles(profiles)

@spec configured_streaming_profiles([module()]) :: [module()]

Returns the subset of profiles that opt into the :streaming delivery key.

Public seam used by mix rindle.doctor's streaming checks as the single source of truth for "is this profile streaming-enabled?". The predicate is identity with the inner report/0 filter — both call streaming_config_for/1 via delivery_policy/0.

configured_tus_profiles(profiles)

@spec configured_tus_profiles([module()]) :: [module()]

Returns the configured subset of profiles expected to mount TusPlug.

Doctor uses this as the single source of truth for capability-only tus checks: the library does not introspect Phoenix routers.

report()

@spec report() :: report()