@hapic/harbor
Version:
A harbor http api client.
40 lines (39 loc) • 927 B
TypeScript
import type { ConfigInput } from './config';
import { HarborClient } from './module';
/**
* Verify if a harbor client singleton instance exists.
*
* @param key
*/
export declare function hasClient(key?: string): boolean;
/**
* Set the harbor client singleton instance.
*
* @param client
* @param key
*/
export declare function setClient(client: HarborClient, key?: string): HarborClient;
/**
* Receive a harbor singleton instance.
*
* @param key
*/
export declare function useClient(key?: string): HarborClient;
/**
* Unset a harbor client singleton instance.
*
* @param key
*/
export declare function unsetClient(key?: string): void;
/**
* Create a harbor client.
*
* @param input
*/
export declare function createClient(input?: ConfigInput): HarborClient;
/**
* Check if the argument is of instance Client.
*
* @param input
*/
export declare function isClient(input: unknown): input is HarborClient;