type

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.type('key', function (err, type) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.typePromise('key')
  .then(type => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.type("key", new ResponseListener<String>() {
  @Override
  public void onSuccess(String type) {
    // callback called once the action has completed
  }

  @Override
  public void onError(JSONObject error) {
  }
});
<?php

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $type = $kuzzle->memoryStorage()->type('key');
}
catch (ErrorException $e) {

}

Callback response:

"zset"

Returns the type of the value held by a key.

[Redis documentation]


type(key, [options], callback)

ArgumentsTypeDescription
keystringKey identifier
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to one of the following values: hash, list, set, string, zset