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

@kronos-integration/endpoint

Package Overview
Dependencies
Maintainers
2
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kronos-integration/endpoint

named communication (end)-points inside of kronos

  • 3.6.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
increased by107.36%
Maintainers
2
Weekly downloads
 
Created
Source

npm Greenkeeper semantic-release styled with prettier Build Status codecov.io Known Vulnerabilities GitHub Issues Dependency Status devDependency Status docs downloads Commitizen friendly

kronos-endpoint

Named communication (end)-points inside of kronos

request forwarding{:height="310pt" width="325pt"}

API

Table of Contents

Endpoint

  • Opposite Endbpoint

Parameters

  • name string endpoint name
  • owner Object of the endpoint (service)
  • options Object (optional, default {})

isDefault

Indicate whatever we are a default endpoint. Default means buildin.

Returns boolean false

toStringAttributes

mapping of properties used in toString

Returns Object

isIn

Returns boolean false

isOut

Returns boolean false

isOpen

Returns boolean false

isConnected

Returns boolean false

direction

Deliver data flow direction

Returns string delivers data flow direction 'in', 'out' or undefined

opposite

Deliver the opposite endpoint

Returns Endpoint representing the opposite direction

InterceptedEndpoint

Extends Endpoint

Endpoint with a list of interceptors also provides fistInterceptor and lastInterceptor

Parameters

  • name
  • owner
  • options

hasInterceptors

Returns boolean true if there is at least one interceptor assigned

interceptors

Deliver array of all assigned interceptors

Returns Array<Interceptor> the interceptors or empty array if none are present

interceptors

Set the interceptors a connected chain from array element 0 over all entries up to the last element in the array is formed. Additionally firstInterceptor and lastInterceptor are set.

Parameters
  • newInterceptors Array<Interceptor> replaces all interceptors

ReceiveEndpoint

Extends InterceptedEndpoint

Receiving Endpoint by default a dummy rejecting receiver is assigned

Parameters

  • name string endpoint name
  • owner Object of the endpoint (service or step)
  • options Object (optional, default {})
    • options.receive Function? reciever function

connected

Connect other side to us

Parameters
  • other Endpoint endpoint to be connected to

sender

Deliver the sending side Endpoint

Returns SendEndpoint the sending side

receive

get the receive function

Returns Function

receive

Set the recieve function If we know the sender we will inform him about our open/close state by calling willBeClosed() and hasBeenOpened()

Parameters
  • receive Function (optional, default rejectingReceiver)

isOpen

Are we able to receive requests

Returns boolean true if we are able to receive requests

isIn

We are always in

Returns boolean always true

ReceiveEndpointDefault

Extends ReceiveEndpoint

Receive Endpoint acting as a default endpoints

isDefault

We are a default endpoint

Returns boolean always true

SendEndpoint

Extends ConnectorMixin(InterceptedEndpoint)

Sending Endpoint

Parameters

  • name string endpoint name
  • owner Object of the endpoint (service or step)
  • options Object (optional, default {})
    • options.connected Endpoint? where te requests are delivered to
    • options.opposite Endpoint? endpoint going into the opposite direction
    • options.hasBeenConnected Function? called after connected
    • options.hasBeenDisconected Function? called after disconnected
    • options.hasBeenOpened Function? called after receiver is open
    • options.willBeClosed Function? called before receiver is closed

isOut

We are always out

Returns boolean always true

SendEndpointDefault

Extends SendEndpoint

Send Endpoint acting as a default endpoints

isDefault

We are a default endpoint

Returns boolean always true

isEndpoint

check for Endpoint

Parameters

  • object any

Returns boolean true if object is a Endpoint

install

With npm do:

npm install kronos-endpoint

license

BSD-2-Clause

Keywords

FAQs

Package last updated on 22 Nov 2019

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