1.0.0 • Published 6 years ago
seneca-mesh-dns-discovery v1.0.0
seneca-mesh-dns-discovery
A custom function for Seneca Mesh to discover base nodes using DNS resolver. Can be used when your services are running under a Docker or Kubernetes network that base services are determined by containers name.
Install
npm install seneca-mesh-dns-discovery
How to use
require('seneca')()
.use('mesh', {
pin: 'role:*',
host: HOST || require('ip').address(),
sneeze: {
swim: { interval: 5000 },
},
bases: BASES,
discover: {
defined: {
active: false,
},
registry: {
active: false,
},
multicast: {
active: false,
},
guess: {
active: false,
},
custom: {
active: true,
find: require('seneca-mesh-dns-discovery'),
},
},
})
1.0.0
6 years ago