@katanaml/skipper-lib-js

1.5.0 • Public • Published

@katanaml/skipper-lib-js

npm (scoped)

Overview

This is a helper library for Katana ML Skipper workflow product. The idea of this library is to wrap all reusable code to simplify and improve workflow implementation.

Supported functionality:

  • API to communicate with RabbitMQ for event receiver/producer

Read more - Katana ML

Author

Katana ML, Andrej Baranovskij

Install

$ npm install --save @katanaml/skipper-lib-js

Usage

// Receiver
var event_receiver = new EventReceiver(RABBITMQ_USER, 
                                       RABBITMQ_PASSWORD, 
                                       RABBITMQ_HOST, 
                                       RABBITMQ_PORT, 
                                       QUEUE_NAME,
                                       SERVICE_NAME);
event_receiver.startListener(event_receiver.onRequest, new MobilenetService(), LOGGER_RECEIVER_URL);

// Producer
var event_producer = new EventProducer(
            RABBITMQ_USER,
            RABBITMQ_PASSWORD,
            RABBITMQ_HOST,
            RABBITMQ_PORT);

var data = {
    'task_type': 'training',
    'payload': '0.2',
    'description': 'string'
}
data = JSON.stringify(data);
event_producer.call(this.processResponse, data, LOGGER_RECEIVER_URL, QUEUE_NAME_DATA, SERVICE_NAME);

Publishing on NPM

  1. Set new version
npm version minor
  1. Publish
npm publish

Structure

.
├── LICENSE
├── package.json
├── skipper
│   ├── events
│       ├── event_producer.py
│       └── event_receiver.py
└── README.md

License

Licensed under the Apache License, Version 2.0. Copyright 2020-2021 Katana ML, Andrej Baranovskij. Copy of the license.

/@katanaml/skipper-lib-js/

    Package Sidebar

    Install

    npm i @katanaml/skipper-lib-js

    Weekly Downloads

    0

    Version

    1.5.0

    License

    Apache-2.0

    Unpacked Size

    20.2 kB

    Total Files

    5

    Last publish

    Collaborators

    • katanaml