Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mesosphere-backup/mesos-client
Wraps Mesos Event Stream API into rxjs Observable.
https://github.com/mesosphere-backup/mesos-client
client http mesos observable rxjs
Last synced: 3 months ago
JSON representation
Wraps Mesos Event Stream API into rxjs Observable.
- Host: GitHub
- URL: https://github.com/mesosphere-backup/mesos-client
- Owner: mesosphere-backup
- License: apache-2.0
- Created: 2017-10-25T08:29:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T08:20:00.000Z (about 2 years ago)
- Last Synced: 2024-11-09T16:08:40.425Z (3 months ago)
- Topics: client, http, mesos, observable, rxjs
- Language: JavaScript
- Size: 1.63 MB
- Stars: 5
- Watchers: 6
- Forks: 1
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Apache Mesos Client [![Build Status](https://travis-ci.org/dcos-labs/mesos-client.svg?branch=master)](https://travis-ci.org/dcos-labs/mesos-client)
---
👩🔬 Please be aware that this package is still experimental —
changes to the interface and underlying implementation are likely,
and future development or maintenance is not guaranteed.---
This package provides a nice way of connecting to the Mesos Event Stream API. It is a wrapper that uses `@dcos/http-service` to establish a connection and `@dcos/recordio` package to parse the incoming data and deliver it as a `Rx.Observable`.
## Example
```javascript
import { stream, request } from "@dcos/mesos-client";stream({ type: "SUBSCRIBE" }).subscribe(
value => console.log(value),
error => console.log(error),
() => console.log("complete")
);request({ type: "GET_FLAGS" }).subscribe(
value => console.log(value),
error => console.log(error),
() => console.log("complete")
);
````stream` opens a persistent connection to [Mesos HTTP Operator Api](http://mesos.apache.org/documentation/latest/operator-http-api) Event Stream and returns `rxjs` Observable.
`request` makes a call to the [Mesos HTTP Operator Api](http://mesos.apache.org/documentation/latest/operator-http-api) and returns response as an `rxjs` Observable.