{"_id":"@antares-tech/kuiper","_rev":"2-c7978a1bdc4290c86a872925fb366515","name":"@antares-tech/kuiper","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@antares-tech/kuiper","version":"0.1.0","author":{"name":"Antares Tech","email":"avinash@antares-tech.com"},"license":"ISC","_id":"@antares-tech/kuiper@0.1.0","maintainers":[{"name":"snigdh-antares","email":"snigdh@antares-tech.com"},{"name":"aksh4t","email":"akshat@antares-tech.com"},{"name":"soumik-antares","email":"soumik@antares-tech.com"},{"name":"avinash-antares","email":"npm@antares-tech.com"}],"homepage":"https://github.com/antares-tech/kuiper","bugs":{"url":"https://github.com/antares-tech/kuiper/issues"},"dist":{"shasum":"9c7fac56d8152fda1bd737b1ebd4f9d77d2c397b","tarball":"https://registry.npmjs.org/@antares-tech/kuiper/-/kuiper-0.1.0.tgz","fileCount":21,"integrity":"sha512-lbuT7dOP7xNpl/So5jFnM5Ah18mNPjwXy3SvVY9q0u/6MDVxVY37mQLGT3+Vpvn2oOi809tYxrVQWZbkq0NJ7w==","signatures":[{"sig":"MEUCIQCWC85rd1I6mN9SY4PsbUOENLBLE0rlvGpeT3jUxN1eUQIgNCprAQmCUIxy5bFmAJa6rOd5B6RxgaNSPn9k11w9bgs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@antares-tech%2fkuiper@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":31350},"main":"kuiper.js","engines":{"npm":">= 9","node":">= 18"},"gitHead":"042c7e720553fa194b3ac47f156d32dd377ae88d","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"avinash-antares","email":"npm@antares-tech.com"},"repository":{"url":"git+https://github.com/antares-tech/kuiper.git","type":"git"},"_npmVersion":"10.2.4","description":"Service discovery for micro-services","directories":{},"_nodeVersion":"20.11.1","dependencies":{"nats":"^1.2.10","bunyan":"^1.8.12"},"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/kuiper_0.1.0_1711478743955_0.5499801806655238","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@antares-tech/kuiper","version":"0.2.0","description":"Service discovery for micro-services","main":"kuiper.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"dependencies":{"bunyan":"^1.8.12","nats":"^1.2.10"},"devDependencies":{},"repository":{"type":"git","url":"git+https://github.com/antares-tech/kuiper.git"},"engines":{"node":">= 18","npm":">= 9"},"author":{"name":"Antares Tech","email":"avinash@antares-tech.com"},"license":"ISC","bugs":{"url":"https://github.com/antares-tech/kuiper/issues"},"homepage":"https://github.com/antares-tech/kuiper","_id":"@antares-tech/kuiper@0.2.0","gitHead":"778ed9bd908a88efe264dfd131b18f6c839ac5b6","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-fJ1owTOd37zWoMj0+vKq3daoNcH8kdh30YQMt06MqEJgGJlyhzGta6eFiebMcs7gb/tYAJ6bDEzjI7/VIWcboQ==","shasum":"c4fb65048aab3feb1ed4e74505c63577da8a5749","tarball":"https://registry.npmjs.org/@antares-tech/kuiper/-/kuiper-0.2.0.tgz","fileCount":21,"unpackedSize":31434,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@antares-tech%2fkuiper@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHEeoaTkOM8wfLw1U1O/Rh7Hv25NsBoAA5iuRkymbs4CAiBIzuQlGWEHZnrl35EWT1KPO1Fq5D5iX7AwN5yR0vWDWg=="}]},"_npmUser":{"name":"avinash-antares","email":"npm@antares-tech.com"},"directories":{},"maintainers":[{"name":"snigdh-antares","email":"snigdh@antares-tech.com"},{"name":"avinash-antares","email":"npm@antares-tech.com"},{"name":"soumik-antares","email":"soumik@antares-tech.com"},{"name":"aksh4t","email":"akshat@antares-tech.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kuiper_0.2.0_1757915359197_0.676915794098679"},"_hasShrinkwrap":false}},"time":{"created":"2024-03-26T18:45:43.824Z","modified":"2025-09-15T05:49:19.779Z","0.1.0":"2024-03-26T18:45:44.098Z","0.2.0":"2025-09-15T05:49:19.385Z"},"bugs":{"url":"https://github.com/antares-tech/kuiper/issues"},"author":{"name":"Antares Tech","email":"avinash@antares-tech.com"},"license":"ISC","homepage":"https://github.com/antares-tech/kuiper","repository":{"type":"git","url":"git+https://github.com/antares-tech/kuiper.git"},"description":"Service discovery for micro-services","maintainers":[{"name":"snigdh-antares","email":"snigdh@antares-tech.com"},{"name":"avinash-antares","email":"npm@antares-tech.com"},{"name":"soumik-antares","email":"soumik@antares-tech.com"},{"name":"aksh4t","email":"akshat@antares-tech.com"}],"readme":"# kuiper [![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)\nIntended to be a service discovery module by [Antares Tech](http://antares-tech.com), for micro-services based architecture using simple NATS messaging.\n\n## Base Idea\nTwo components:\n\n\tApp      : Entity that wants to look for services.\n\tService  : Entity that will announce it's presence and a way to reach them. Presence announcement will be made periodically and on demand.\n\nBoth Apps and Services will connect to a NATS server and listen on configured channels for messages. Services will broadcast their presence every \"__pre-configured__\" duration. In this broadcast, Services will also send out useful information such as \"__networkInfo__\" and other custom data if needed.\n\nApps will be listening to broadcast messages from services and managing, cataloging(among other things) all services. Managing will include keeping count of how many services of which type (user, media etc) are up etc. App module will provide all live services information when requested.\n\n## Usage\n\n__NOTE__ : User will need to have a `nats` server running to be used as message broker. This module uses [nats](https://github.com/nats-io/nats.js) for service discovery protocol message transfers. \n\n### Basic usage\n\n#### App component\n\n__IMPORTANT__ : `natsConfig`(in `appClient.init()` function call) should be in accordance with [nats](https://github.com/nats-io/nats.js) module\n```javascript\nconst appClient = require ('kuiper').appClient;\n\nasync function init () {\n\t/*\n\t * Configuration options for appClient */\n\tlet config = {\n\t\t\"name\" : \"myApp\" \n\t};\n\n\ttry {\n\t\tawait appClient.init (config /*, natsConfig */); // native JS promise\n\t\t/*\n\t\t * Once initialised\n\t\t * get list of services anytime by calling getServices API */\n\t\tlet currentServices = appClient.getServices ();\n\t\tconsole.log ({currentServices}, 'list of services available at this moment');\n\t}\n\tcatch (err) {\n\t\t/*\n\t\t * handle init error */\n\t\tconsole.log ({err}, 'an error occured in kuiper initialisation');\n\t}\n}\n\ninit ();\n```\n\n#### Service component\n\n__IMPORTANT__ : `natsConfig`(in `serviceClient.init()` function call) should be in accordance with [nats](https://github.com/nats-io/nats.js) module\n```javascript\nconst serviceClient = require ('kuiper').serviceClient;\n\nasync function init () {\n\tlet config = {\n\t\t\"id\"   : \"uniqueServiceID-001\", //this should be unique for a service name\n\t\t\"name\" : \"serviceType\", //this is used to categories different instance of a service type on app side\n\t};\n\n\ttry {\n\t\tawait serviceClient.init (config/*, natsConfig */);\n\t}\n\tcatch (err) {\n\t\t/*\n\t\t * handle service init error */\n\t\tconsole.error ({err}, 'error in serviceClient init');\n\t}\n}\n\ninit ();\n```\n\n## Setup dev environment \nSetup your Ubuntu 18.04 Development Environment by runnning the following command\n```\ncd scripts\n./setup.sh\n```\n\n### TODO in usages\n\n- List all APIs (and their examples) for appClient and serviceClient\n- What kind of data will app get on `appClient.getServices ()`\n- List all config options for `appClient.init ()`\n- List all config options for `serviceClient.init ()`\n- Examples of other config option usages\n","readmeFilename":"README.md"}