MachineRegistry.getMachineInfo()

Get metadata for the specified machine within the specified machinepack.

Usage

Hover over inputs/exits for more info.

var MachineRegistry = require('machinepack-registry');


// Get metadata for the specified machine within the specified machinepack.

MachineRegistry.getMachineInfo({

machinepack: 'machinepack-whatever',

machine: 'do-stuff',

registry: 'http://node-machine.org',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// No machinepack or machine with specified identity found in registry.

notFound: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

machinepack required

The identity of the machinepack this machine belongs to.

'machinepack-whatever'
machine required

The identity of the machine to look up.

'do-stuff'
registry

The base URL of the machine registry to use (defaults to the public registry at http://node-machine.org)

'http://node-machine.org'

Exits

error

An unexpected error occurred.

notFound

No machinepack or machine with specified identity found in registry.

success

OK.

{ identity: 'do-stuff',
  friendlyName: 'Do stuff and things',
  variableName: 'doStuff',
  description: 'Do stuff given other stuff.',
  fn: 'some stringified function',
  rawJsonStr: '{"identity": "do-stuff", etc.}' }