node-consul-service
Version:
A robust Node.js service that integrates with HashiCorp Consul for service discovery and configuration management. This service provides a comprehensive solution for managing distributed systems and microservices architecture, making it easier to handle s
18 lines (17 loc) • 473 B
TypeScript
import { AxiosRequestHeaders, Method } from 'axios';
interface CallServiceOptions {
method?: Method;
path?: string;
data?: any;
headers?: AxiosRequestHeaders;
params?: Record<string, any>;
}
interface ServiceResponse<T = any> {
success: boolean;
data?: T;
message?: string;
status?: number;
code?: string;
}
export declare function callService(serviceName: string, options?: CallServiceOptions): Promise<ServiceResponse>;
export {};