2.15.0 • Published 6 years ago

kronos-endpoint v2.15.0

Weekly downloads
24
License
BSD-2-Clause
Repository
github
Last release
6 years ago

npm Greenkeeper semantic-release styled with prettier Build Status codecov.io Coverage Status Known Vulnerabilities GitHub Issues Stories in Ready Dependency Status devDependency Status docs XO code style downloads Commitizen friendly

kronos-endpoint

Named communication (end)-points inside of kronos

request forwarding

API

Table of Contents

Endpoint

Parameters

  • name string endpoint name
  • owner Object of the endpoint (service or step)
  • options Object (optional, default {})
    • options.opposite Endpoint? opposite endpoint
    • options.createOpposite boolean? true to auto create an opposite endpoint

isDefault

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

Returns boolean false

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

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

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 recive function

Returns Function

receive

Set the recive 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.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

install

With npm do:

npm install kronos-endpoint

license

BSD-2-Clause

2.15.0

6 years ago

2.14.16

7 years ago

2.14.15

7 years ago

2.14.14

7 years ago

2.14.13

7 years ago

2.14.12

7 years ago

2.14.11

8 years ago

2.14.10

8 years ago

2.14.9

8 years ago

2.14.8

8 years ago

2.14.7

8 years ago

2.14.6

8 years ago

2.14.5

8 years ago

2.14.4

8 years ago

2.14.3

8 years ago

2.14.2

8 years ago

2.14.1

8 years ago

2.14.0

8 years ago

2.13.4

8 years ago

2.13.3

8 years ago

2.13.2

8 years ago

2.13.1

8 years ago

2.13.0

8 years ago

2.12.0

8 years ago

2.11.0

8 years ago

2.10.1

8 years ago

2.10.0

8 years ago

2.9.1

9 years ago

2.9.0

9 years ago

2.8.1

9 years ago

2.8.0

9 years ago

2.7.0

9 years ago

2.6.0

9 years ago

2.5.0

9 years ago

2.4.0

9 years ago

2.3.0

9 years ago

2.2.0

9 years ago

2.1.0

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago