Files
qinglong/back/runtime/ports/runtimeRolloutLoader.ts
T

35 lines
875 B
TypeScript

import type { RuntimeRolloutPolicy } from '../domain/runtimeRollout';
import type { RuntimeRolloutManifest } from '../domain/runtimeRolloutManifest';
export type RuntimeRolloutLoadStatus =
| 'missing'
| 'disabled'
| 'accepted'
| 'rejected';
export interface RuntimeRolloutLoadAudit {
event: 'runtime.rollout_config_evaluated';
evaluatedAtMs: number;
sourcePath: string;
status: RuntimeRolloutLoadStatus;
sourceSha256?: string;
revision?: string;
reasonCode?:
| 'FILE_MISSING'
| 'FILE_READ_FAILED'
| 'FILE_TOO_LARGE'
| 'INVALID_JSON'
| 'INVALID_MANIFEST';
}
export interface RuntimeRolloutLoadResult {
status: RuntimeRolloutLoadStatus;
policy: RuntimeRolloutPolicy;
audit: RuntimeRolloutLoadAudit;
manifest?: RuntimeRolloutManifest;
}
export interface RuntimeRolloutLoader {
load(): Promise<RuntimeRolloutLoadResult>;
}