Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

workflow-manager

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workflow-manager

Minimal Workflow orchestrator for AWS Batch

  • 0.5.2
  • npm
  • Socket score

Version published
Weekly downloads
135
decreased by-42.06%
Maintainers
1
Weekly downloads
 
Created
Source

Modules

workflow-manager

workflow-manager client library.

Functions

responseLog()

Request status log is used to to output the status of a request returned by the client.

workflow-manager

workflow-manager client library.

WorkflowManager ⏏

workflow-manager client

Kind: Exported class

new WorkflowManager(options)

Create a new client object.

ParamTypeDefaultDescription
optionsObjectOptions for constructing a client object.
[options.address]stringURL where the server is located. Must provide this or the discovery argument
[options.discovery]boolUse clever-discovery to locate the server. Must provide this or the address argument
[options.timeout]numberThe timeout to use for all client requests, in milliseconds. This can be overridden on a per-request basis.
[options.retryPolicy]RetryPoliciesRetryPolicies.SingleThe logic to determine which requests to retry, as well as how many times to retry.
[options.logger]module:kayvee.Loggerlogger.New("workflow-manager-wagclient")The Kayvee logger to use in the client.
[options.circuit]ObjectOptions for constructing the client's circuit breaker.
[options.circuit.forceClosed]boolWhen set to true the circuit will always be closed. Default: true.
[options.circuit.maxConcurrentRequests]numberthe maximum number of concurrent requests the client can make at the same time. Default: 100.
[options.circuit.requestVolumeThreshold]numberThe minimum number of requests needed before a circuit can be tripped due to health. Default: 20.
[options.circuit.sleepWindow]numberhow long, in milliseconds, to wait after a circuit opens before testing for recovery. Default: 5000.
[options.circuit.errorPercentThreshold]numberthe threshold to place on the rolling error rate. Once the error rate exceeds this percentage, the circuit opens. Default: 90.

workflowManager.healthCheck([options], [cb]) ⇒ Promise

Checks if the service is healthy

Kind: instance method of WorkflowManager
Fulfill: undefined
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.postStateResource(NewStateResource, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
NewStateResource
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.deleteStateResource(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: undefined
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.namespacestring
params.namestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getStateResource(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.namespacestring
params.namestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.putStateResource(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.namespacestring
params.namestring
[params.NewStateResource]
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowDefinitions([options], [cb]) ⇒ Promise

Get the latest versions of all available WorkflowDefinitions

Kind: instance method of WorkflowManager
Fulfill: Object[]
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.newWorkflowDefinition(NewWorkflowDefinitionRequest, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: InternalError
Reject: Error

ParamTypeDescription
NewWorkflowDefinitionRequest
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowDefinitionVersionsByName(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object[]
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDefaultDescription
paramsObject
params.namestring
[params.latest]booleantrue
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.updateWorkflowDefinition(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
[params.NewWorkflowDefinitionRequest]
params.namestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowDefinitionByNameAndVersion(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.namestring
params.versionnumber
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflows(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object[]
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
[params.limit]numberMaximum number of workflows to return. Defaults to 10. Restricted to a max of 10,000.
[params.oldestFirst]boolean
[params.pageToken]string
[params.status]string
params.workflowDefinitionNamestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowsIter(params, [options]) ⇒ Object | function | function | function

Kind: instance method of WorkflowManager
Returns: Object - iterfunction - iter.map - takes in a function, applies it to each resource, and returns a promise to the result as an arrayfunction - iter.toArray - returns a promise to the resources as an arrayfunction - iter.forEach - takes in a function, applies it to each resource

ParamTypeDescription
paramsObject
[params.limit]numberMaximum number of workflows to return. Defaults to 10. Restricted to a max of 10,000.
[params.oldestFirst]boolean
[params.pageToken]string
[params.status]string
params.workflowDefinitionNamestring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy

workflowManager.startWorkflow(StartWorkflowRequest, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
StartWorkflowRequestParameters for starting a workflow (workflow definition, input, and optionally namespace, queue, and tags)
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.CancelWorkflow(params, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: undefined
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
paramsObject
params.workflowIdstring
params.reason
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

workflowManager.getWorkflowByID(workflowId, [options], [cb]) ⇒ Promise

Kind: instance method of WorkflowManager
Fulfill: Object
Reject: BadRequest
Reject: NotFound
Reject: InternalError
Reject: Error

ParamTypeDescription
workflowIdstring
[options]object
[options.timeout]numberA request specific timeout
[options.span]SpanAn OpenTracing span - For example from the parent request
[options.retryPolicy]RetryPoliciesA request specific retryPolicy
[cb]function

WorkflowManager.RetryPolicies

Retry policies available to use.

Kind: static property of WorkflowManager

RetryPolicies.Exponential

The exponential retry policy will retry five times with an exponential backoff.

Kind: static constant of RetryPolicies

RetryPolicies.Single

Use this retry policy to retry a request once.

Kind: static constant of RetryPolicies

RetryPolicies.None

Use this retry policy to turn off retries.

Kind: static constant of RetryPolicies

WorkflowManager.Errors

Errors returned by methods.

Kind: static property of WorkflowManager

Errors.BadRequest ⇐ Error

BadRequest

Kind: static class of Errors
Extends: Error
Properties

NameType
messagestring

Errors.InternalError ⇐ Error

InternalError

Kind: static class of Errors
Extends: Error
Properties

NameType
messagestring

Errors.NotFound ⇐ Error

NotFound

Kind: static class of Errors
Extends: Error
Properties

NameType
messagestring

WorkflowManager.DefaultCircuitOptions

Default circuit breaker options.

Kind: static constant of WorkflowManager

responseLog()

Request status log is used to to output the status of a request returned by the client.

Kind: global function

FAQs

Package last updated on 30 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc