import HealthChecks from './health-checks'; import ServiceInfos from './service-infos'; const enums = { errorSourceType: ['pointer', 'parameter', 'header'], healthStatus: ['running', 'starting', 'unhealthy'], sortDirection: ['asc', 'desc'], }; export default class CommonClient { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } this.enums = enums; this.healthChecks = new HealthChecks(options); this.serviceInfos = new ServiceInfos(options); } }