itier

A client library for itier in Node.

Usage no npm install needed!

<script type="module">
  import itier from 'https://cdn.skypack.dev/itier';
</script>

README

Build Status

About

itier-client is a client library for itier

Install

    npm install itier

Usage

    var itier	= require('itier-client').createClient({
            'appname'   : 'username',
            'apppass'   : 'password',
    });

    itier.connect('127.0.0.1', 9999).connect('127.0.0.2');
    itier.query('SELECT * FROM table WHERE c1 = :c', {
            'c' : 1211
    }, function(error, data, header, profile) {
        if (error) {
            throw new Error(error);
        }

        /**
          * @write to cache
          */
        // cache.write(key, data, header.expire + now);
    });

TODO

  • Query options support, such as "usecache" and "debug" [done];
  • Get itier service status and hosts list from config-server;