Tactical Media Broadcast Hub — initial release
Self-hosted multi-platform broadcast newsroom for activist collectives: publishing pipeline with group approval and DST-proof scheduling, TweetDeck-style column wall with hostile-content-safe rendering, live control room with Auto Director, bridged chat governance with polls and quorum, distributed sandboxed transcode workers, encrypted content-addressed archive, monthly analytics. MIT licensed. See README.md and docs/.
This commit is contained in:
commit
aa5e262f3a
880 changed files with 111042 additions and 0 deletions
23
packages/egress/src/budget.d.ts
vendored
Normal file
23
packages/egress/src/budget.d.ts
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import type { Pool } from "pg";
|
||||
export declare const REFILL_INTERVAL_MS = 10000;
|
||||
export interface HostBudget {
|
||||
capacity: number;
|
||||
refillPerInterval: number;
|
||||
}
|
||||
export declare const DEFAULT_HOST_BUDGET: Readonly<HostBudget>;
|
||||
export interface HostBudgetOptions {
|
||||
pool: Pick<Pool, "connect">;
|
||||
hostClasses?: Readonly<Record<string, HostBudget>>;
|
||||
/** Test clock only. Production uses the DB clock sampled after acquiring the row lock. */
|
||||
now?: () => Date;
|
||||
}
|
||||
export declare function retryAfterDeadline(headers: Headers, now: number): number | undefined;
|
||||
export declare class HostBudgets {
|
||||
private readonly options;
|
||||
constructor(options: HostBudgetOptions);
|
||||
private configuration;
|
||||
private locked;
|
||||
consume(host: string, hostClass: string): Promise<void>;
|
||||
/** Header hints can only tighten a shared budget; parking is monotone under concurrent responses. */
|
||||
observe(host: string, hostClass: string, status: number, headers: Headers): Promise<void>;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue