import { GGDiscoveryClient, GGServiceRegistration } from "@grest-ts/discovery"; /** * Static service discovery for simple cloud deployments * * Use this when: * - Running on AWS Elastic Beanstalk, Heroku, Railway, Fly.io, etc. * - You have static/known service URLs * - No dynamic service discovery infrastructure (no Consul, K8s, etc.) * - Services are configured via environment variables * * Example environment variables: * ``` * USER_API_URL=https://user-service.elasticbeanstalk.com/api/users/ * ORDER_API_URL=https://order-service.us-east-1.elasticbeanstalk.com/api/orders/ * PAYMENT_API_URL=https://payment.myapp.com/api/payments/ * ``` * * Or using a config object: * ```typescript * const discovery = new GGStaticServiceDiscovery({ * UserApi: 'https://user-service.elasticbeanstalk.com/api/users/', * OrderApi: 'https://order-service.elasticbeanstalk.com/api/orders/' * }); * ``` */ export declare class GGStaticServiceDiscovery extends GGDiscoveryClient { private readonly apiUrls; /** * @param config Optional static configuration map (apiName -> full URL) * If not provided, will read from environment variables: {API_NAME}_URL */ constructor(config?: Record); /** * Convert environment variable name to API name * USER_API_URL -> UserApi * ORDER_SERVICE_API_URL -> OrderServiceApi */ private envVarToApiName; registerRoutes(registrations: GGServiceRegistration[]): void; register(): Promise; unregister(): Promise; discoverApi(apiName: string): Promise; /** * Convert API name to environment variable name * UserApi -> USER_API_URL */ private apiNameToEnvVar; private getExampleUrl; } //# sourceMappingURL=GGStaticServiceDiscovery.d.ts.map