@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
44 lines • 1.97 kB
TypeScript
import type { JaegerConfig } from '../../vfs/jaeger/config.ts';
import { ApiError } from '../api/errors.ts';
export declare class JaegerApiError extends ApiError {
constructor(message: string, status?: number | null);
}
/**
* Report whether a name is a syntactically valid Jaeger trace id.
*
* Checked before calling the API so a malformed id becomes ENOENT instead of
* the API's 400 "invalid length for TraceID".
*/
export declare function isTraceId(value: string): boolean;
export interface JaegerTransport {
request(path: string, query?: Record<string, string | number | undefined>): Promise<unknown>;
}
export declare class HttpJaegerTransport implements JaegerTransport {
protected readonly fetch: typeof fetch;
private readonly host;
private readonly timeout;
constructor(opts?: Pick<JaegerConfig, 'host' | 'timeout'>);
request(path: string, query?: Record<string, string | number | undefined>): Promise<unknown>;
}
export declare function fetchServices(transport: JaegerTransport): Promise<string[]>;
/**
* List operations recorded for a service.
*
* An unknown service yields an empty list rather than an error, so callers
* that need existence semantics must check the service list first.
*/
export declare function fetchOperations(transport: JaegerTransport, service: string): Promise<Record<string, unknown>[]>;
export interface FetchTracesOptions {
limit?: number;
fromTimestamp?: string;
toTimestamp?: string;
}
/**
* Search traces for a service within an explicit time window.
*
* `service` is required by the API and `lookback` is ignored, so the window is
* always sent as explicit microsecond bounds.
*/
export declare function fetchTraces(transport: JaegerTransport, service: string, opts?: FetchTracesOptions): Promise<Record<string, unknown>[]>;
export declare function fetchTrace(transport: JaegerTransport, traceId: string): Promise<Record<string, unknown>>;
//# sourceMappingURL=client.d.ts.map