MediaProviderHealthDegradedPayload media.provider.health_degraded@1
Generated at from
openvibe-contracts v0.97.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- media
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/media.provider.health_degraded.v1.json
media.provider.health_degraded v1 (OpenVibe.Media server/placement/providers.js liveHealth(), the announceProviderEvent on a healthy→unhealthy flip; PR #18). A storage provider that was healthy failed its per-minute HeadBucket, so the fabric stops routing to it until it answers again. Emitted once per flip, not once per tick: another failing HEAD while it is already unhealthy records nothing, and a recovery is a media.storage.recovered style state change, not another degradation. The event lives in the media namespace because OpenVibe.Events gates a service's event_type to a prefix that starts with its source name; the original provider.* type could never be published by source media (403 events.type_not_allowed). Envelope: subject { type: provider, id: <provider> }, visibility internal, priority low, actor service:media, source media.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
app_id | string | null | yes | Always null: a provider serves every tenant, so the signal belongs to no one app. | |
provider | enum | yes | The provider that failed its health check. |
|
healthy | const | yes | This event exists only for the healthy→unhealthy flip, so it is always false. |
|
last_error | string | yes | The error the failed health check recorded. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: r2-outage
{
"app_id": null,
"provider": "r2",
"healthy": false,
"last_error": "HeadBucket 503 Service Unavailable"
}Rejected: healthy-true
{
"app_id": null,
"provider": "r2",
"healthy": true,
"last_error": "HeadBucket 503 Service Unavailable"
}Rejected: unknown-provider
{
"app_id": null,
"provider": "s3",
"healthy": false,
"last_error": "HeadBucket 503 Service Unavailable"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('media.provider.health_degraded@1', value); // { valid, errors: [{ path, message }] }