sds

sarathi-discovery-strategy

An abstract class implementing Sarathi's discovery API.

Showing:

Popularity

Downloads/wk

9

GitHub Stars

0

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

0

Size (min+gzip)

0.3KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

sarathi-discovery-strategy

An abstract class implementing Sarathi's discovery API.

API

###getDiscoveredInstances Return the array containing instance information of discovered instances. The format of these instance objects is:

[{
    address: "", // ip address OR domain
    port: "", // port for use
    url: "" // form a url with the address and port and supported protocol, the protocol can be asked by the strategy, or decided, but the url should have it.
}]

###discoveryDone(successHandler: Function, failureHandler: Function) Trigger the callback when discovery is done and instances are ready to be pulled. Only when the success callback is invoked, any calls to the APIs will be triggered. If promise is already resolved, it should trigger the callback immediately. Behavior of Sarathi, on invocation of error handler depends on availability of nodes to use from previous load.

###discoverInstances Method that indicates that sarathi is configured and ready to start discovery of services.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100