Skip to content

Latest commit

 

History

History
78 lines (67 loc) · 1.73 KB

tencentcloud-cls-uploader-sdk.md

File metadata and controls

78 lines (67 loc) · 1.73 KB

API Report File for "tencentcloud-cls-uploader-sdk"

Do not edit this file. It is a report generated by API Extractor.

import { AxiosAdapter } from 'axios';

// @public
class ClsClient {
    constructor(options?: IClientConfig);
    destory(): void;
    init(options: IClientConfig): void;
    log(log: Record<string, any>, _immediate?: boolean): void;
}
export default ClsClient;

// @public
export type GetAuthorizationFn = (options: {
    method: string;
    headers: any;
    query: any;
}) => Promise<QcloudTmpCredential>;

// @public
export interface IClientConfig {
    api?: string | {
        anony: string;
        auth: string;
    };
    credential?: QCloudCredential;
    endpoint?: string;
    getAgent?: () => any;
    getAuthorization?: GetAuthorizationFn;
    httpAdapter?: 'xhr' | 'http' | AxiosAdapter;
    logExpiredDays?: number;
    logPath?: string;
    maxRetainDuration?: number;
    maxRetainSize?: number;
    onError?: (error: IClsSDKError) => void;
    proxy?: {
        host: string;
        port: number;
        protocol?: string;
    };
    region?: string;
    sourceIp?: string;
    topicId: string;
}

// @public
export interface IClsSDKError {
    code?: string;
    getMessage(): string;
    requestId?: string;
    status?: number;
    toLocaleString(): string;
    toString(): string;
}

// @public
export interface QCloudCredential {
    SecretId: string;
    SecretKey: string;
}

// @public
export interface QcloudTmpCredential {
    ExpiredTime: number;
    StartTime: number;
    TmpSecretId: string;
    TmpSecretKey: string;
    Token: string;
}

// (No @packageDocumentation comment for this package)