# @dcos/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.

Latest version **1.0.0** (published 2018-12-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @dcos/mesos-client
pnpm add @dcos/mesos-client
yarn add @dcos/mesos-client
bun add @dcos/mesos-client
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-12-19 |
| First published | 2017-10-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 157.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | brandonc, dschmidt, fabsn, juliangieseke, mesosphere-frontend-ci, mesosphere-it, mperrotti, natmegs, nlight, orlandohohmeier, specone, tattdcodemonkey, tnguyen0 |

## Links

- npm: https://www.npmjs.com/package/@dcos/mesos-client
- Repository: https://github.com/dcos-labs/mesos-client
- Homepage: https://github.com/dcos-labs/mesos-client#readme
- Issues: https://github.com/dcos-labs/mesos-client/issues
- npm.io page: https://npm.io/package/@dcos/mesos-client

## Dependencies (4)

- [rxjs](https://npm.io/package/rxjs.md) 6.3.3
- [@dcos/recordio](https://npm.io/package/@dcos/recordio.md) 0.1.8
- [@dcos/copychars](https://npm.io/package/@dcos/copychars.md) 0.1.2
- [@dcos/http-service](https://npm.io/package/@dcos/http-service.md) 2.0.0

## Recent versions

- 1.0.0 (latest) — 2018-12-19
- 0.2.6 — 2018-12-18
- 0.2.5 — 2018-08-28
- 0.2.4 — 2018-08-15
- 0.2.3 — 2018-06-27
- 0.2.2 — 2018-06-27
- 0.2.1 — 2018-03-27
- 0.2.0 — 2018-02-21
- 0.1.10 — 2018-01-09
- 0.1.9 — 2017-12-14
- 0.1.8 — 2017-11-27
- 0.1.7 — 2017-11-24
- 0.1.6 — 2017-11-16
- 0.1.5 — 2017-11-07
- 0.1.4 — 2017-11-03
- … 4 more at https://npm.io/package/@dcos/mesos-client/versions

## 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.

---
_Source: https://npm.io/package/@dcos/mesos-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
