mesos-dns-node-resolver

1.0.0 • Public • Published

mesosdns-node-resolver

A small library to resolve records in Mesos DNS (via SRV DNS records) for Node.js.

Dependencies:

None at runtime

Usage

Parameters:

  • serviceName - a service name to resolve, the suffix will be added to it unless it ends with a dot
  • suffixZones - The number of zones in the suffix (defaults to 2, optional)
  • suffix - the DNS suffix (defaults to marathon.mesos)
  • callback - A function that gets err and result (array of object with host property and a sorted ports array)
mesosdns = require("mesosdns-node-resolver");
mesosdns.resolve("service.group", function (err, result) {
  console.log(result);
});

To use promises call promiseResolve without a callback.

Readme

Keywords

Package Sidebar

Install

npm i mesos-dns-node-resolver

Weekly Downloads

5

Version

1.0.0

License

Apache-2.0

Unpacked Size

21 kB

Total Files

7

Last publish

Collaborators

  • kohend
  • jacobkorenzooz