TypeScript/Node.js client SDK for interacting with the Watchdog gRPC service — a microservice monitoring and service discovery system. Current version 1.0.7, requires Node >= 14, ships full TypeScript type definitions, provides a promise-based API built on @grpc/grpc-js. Differentiators: auto-generated from protobuf schemas ensuring server-client sync, built-in timeout handling, and no external runtime dependencies beyond gRPC.
npm install watchdog-grpc-sdkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a WatchdogClient, checks health, registers an HTTP service, lists all services, then closes the connection.
Wrap the new WatchdogClient() call in a try-catch or use a factory that defers connection.
Compare service.getType() === ServiceType.SERVICE_TYPE_HTTP instead of comparing to raw numbers.
import * as grpc from '@grpc/grpc-js'; new WatchdogClient({..., credentials: grpc.credentials.createSsl()});Call client.close() in a finally block after all operations complete.
Ensure your project is configured for ESM (type: module in package.json, or use .mjs extension). If using CommonJS, switch to dynamic import: const { WatchdogClient } = await import('watchdog-grpc-sdk');Verify the WATCHDOG_HOST and WATCHDOG_PORT environment variables or constructor options point to a running instance. Check network connectivity and firewall rules.
Access properties using getter methods: service.getId(), service.getName(), service.getEndpoint(), service.getType(), service.getStatus(). Do not use dot properties like service.id or service.name.
No dependency data recorded yet.