Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@supertenant/superbrain / types / index.d.cts
Size: Mime:
// (c) Copyright 2023 Supertenant Ltd. - all rights reserved.
// See LICENSE file in project root for license terms.
export const superbrain: SuperBrain;
export type SpanID = import('./binding.cjs').SpanID;
export type SpanLabels = import('./binding.cjs').SpanLabels;
export type WaitActionDefinition = {
    PollInterval: number;
};
export type DelayActionDefinition = {
    delay_duration: number;
};
export type HttpRejectActionDefinition = {
    HttpReject: {
        http_rc: number;
    };
};
export type SqlRejectActionDefinition = {
    SqlReject: {
        sql_rc: number;
        error_message: string;
        sql_state: string;
    };
};
export type MongodbRejectActionDefinition = {
    MongodbReject: {
        code: number;
        error_message: string;
    };
};
export type GenericRejectActionDefinition = {
    [key: string]: string;
};
export type ActionDefinition = {} | WaitActionDefinition | HttpRejectActionDefinition | SqlRejectActionDefinition | MongodbRejectActionDefinition | DelayActionDefinition | GenericRejectActionDefinition;
export type ActionDetails = {
    Action: number;
    Definition: ActionDefinition;
};
declare class SuperBrain {
    _initialized: boolean;
    _lib: typeof import("./binding.cjs");
    _config: any;
    _serverless: boolean;
    _integration_circuit_breakers: string[];
    init(configPath?: string | null, supermeterVersion?: string | null): boolean;
    lib(): typeof import("./binding.cjs");
    shutdown(timeout?: number | null): boolean;
    isServerless(): boolean;
    isCircuitBreakerEnabled(): boolean;
    isIntegrationCircuitBreakerEnabled(integrationModule?: string): boolean;
    enableCircuitBreaker(): boolean;
    log(level?: any, msg?: string): boolean;
    openSpan(taskId?: number, spanType?: any, labels?: import('./binding.cjs').SpanLabels): import('./binding.cjs').JSOpenSpanResult | null;
    pollSpanAction(openSpanResult?: import('./binding.cjs').OpenSpanResult): ActionDetails;
    closeSpan(spanId?: SpanID, spanLabels?: SpanLabels): boolean;
    _debugHasSpan(spanId?: SpanID): boolean;
    createTask(parentTaskId: number, taskId: number, taskType?: any): boolean;
    createTaskAutoInc(parentTaskId: number, taskType?: any): number;
    setLabelOnSharedData(taskId: number, key: string, value: string): boolean;
    finishTask(taskId: number): boolean;
    printVersion(): void;
    getAction(actionId: BigInt | null): ActionDetails;
    _updateConfig(): boolean;
}
import { Action } from "@supertenant/superconsts";
export {};