Module: aerospike/info

The info protocol provides access to configuration and statistics for the Aerospike server. This module provides the parse utility function for parsing the info data returned by the Aerospike server.

Source:
See:

Example

const Aerospike = require('aerospike')
Aerospike.connect((error, client) => {
  if (error) throw error

  var cmd = 'build\nfeatures'
  client.infoAny(cmd, (err, infoStr) => {
    if (err) {
      console.error('error retrieving info for cmd "%s": %s [%d]',
      cmd, err.message, err.code)
    } else {
      var info = Aerospike.info.parse(infoStr)
      console.log(info) // => { build: '3.12.0',
                        //      features: [
                        //        'cdt-list',
                        //        'pipelining',
                        //        'geo',
                        //        ...,
                        //        'udf' ] }
    }
    client.close()
  })
})

Methods


<static> parse(info)

Parses the info string returned from a cluster node into key-value pairs.

Parameters:
Name Type Description
info string

The info string returned by the cluster node.

Since:
  • v2.6
Source:
Returns:

key-value pairs

Type
Object

<inner> chop()

Returns a new string with the last character removed

Source: