@nwt/conductor-javascript
v0.0.4
Published
Typescript Client for Netflix Conductor
Downloads
4
Maintainers
Readme
Conductor Javascript SDK
This project provides client SDKs to interact with Netflix and Orkes conductor servers.
Quick Start
Setup conductor
Simple connection to conductor
const client = new ConductorClient({
serverUrl: "https://play.orkes.io/api",
});
Using TLS
The client uses node-fetch
which supports node.js's httpsAgent
options. For example:
import {Agent} from "https"
import {ConductorClient} from "@io-orkes/conductor-typescript";
const agentOptions = {
key: "<buffer>",
cert: "<buffer>",
ca: "<buffer>",
servername: 'play.orkes.io',
// ...
}
const client = new ConductorClient({
serverUrl: 'https://play.orkes.io/api',
AGENT: new Agent(agentOptions)
})
const taskManager = new TaskManager(client, [ /* workers */ ])
taskManager.startPolling()
Connect to conductor using Orkes
/**
* Application keys generated from the Application menu > Create Application
* then edit and create Access Keys
*
*/
import { OrkesApiConfig, orkesConductorClient } from "@io-orkes/conductor-typescript";
const config: Partial<OrkesApiConfig> = {
keyId: "XXX",
keySecret: "XXXX",
serverUrl: "https://play.orkes.io/api",
};
orkesConductorClient(config).then(client => ..... );