npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mesos

v0.7.0

Published

Mesos clients

Downloads

7

Readme

Mesos

Mesos clients.

Documentation

Initialize a new Chronos client.

Options

  • host (String, default: 127.0.0.1): Chronos address
  • port (String, default: 4400): Chronos HTTP port
  • secure (Boolean, default: false): enable HTTPS

Usage

var mesos = require('mesos');

var chronos = mesos.Chronos({ host: '10.141.141.10' });

Create job.

Options

  • name (String): job name
  • schedule (String): ISO-8601 recurring series time
  • command (String): command to execute
  • epsilon (String): run if missed within this time period (ISO-8601 duration)
  • owner (String): email address of job owner
  • async (Boolean, default: false): run job asynchronously

chronos.job.destroy(opts, callback)

Delete job.

Options

  • name (String): job name

List jobs.

chronos.job.search(opts, callback)

Search jobs.

Options

  • name (String, optional): query on name
  • command (String, optional): query on command
  • any (String, optional): query on any field
  • limit (Number, default: 10): limit the number of results
  • offset (Number, default: 0): offset results by number

chronos.job.start(opts, callback)

Manually start job.

Options

  • name (String): job name

chronos.job.stats(opts, callback)

Get jobs statistics.

Options

  • name (String, optional): job name
  • percentile (String, optional): statistic type

If you specify the job name you'll get all the statistics for that job, otherwise if you specify a percentile you'll get that statistic for all jobs.

You must specify either a job name or a percentile.

chronos.task.update(opts, callback)

Update task.

Options

  • id (String): task id
  • statusCode (Integer, supports: 0, 1): task succeeded (0) or fail (1)

chronos.task.kill(opts, callback)

Kill tasks.

Options

  • job (String): job name

Initialize a new Marathon client.

Options

  • host (String, default: 127.0.0.1): Marathon address
  • port (String, default: 8080): Marathon HTTP port
  • secure (Boolean, default: false): enable HTTPS

Usage

var mesos = require('mesos');

var marathon = mesos.Marathon({ host: '10.141.141.10' });

See Marathon REST documentation for more information.

Create and start a new application.

Options

  • id (String): app ID
  • cpus (Number): number of CPUs for each instance
  • mem (Number): amount of memory for each instance
  • instances (Number): number of instances
  • cmd (String, optional): command to execute

And more, see docs.

List all running applications.

Options

  • cmd (String, optional): filter apps by command

Get application with by ID.

Options

  • id (String): app ID

List the versions of an application by ID.

Options

  • id (String): app ID

List the configuration of an application by ID at a specified version.

Options

  • id (String): app ID
  • version (String): app version

Change parameters of a running application. The new application parameters apply only to subsequently created tasks, and currently running tasks are not pre-emptively restarted.

Options

  • id (String): app ID
  • cpus (Number): number of CPUs for each instance
  • mem (Number): amount of memory for each instance
  • instances (Number): number of instances
  • cmd (String, optional): command to execute

And more, see docs.

Destroy an applicationb by ID.

Options

  • id (String): app ID

List all running tasks for an application by ID.

Options

  • id (String): app ID

Kill tasks that belong to an application.

Options

  • id (String): app ID
  • task (String, optional): kill by task ID
  • host (String, optional): restrict to tasks on specified slave (can't use with task)
  • scale (Boolean, optional): scale application down by one

Register a callback URL as an event subscriber.

Options

  • url (String): callback URL

List all event subscriber callback URLs.

Unregister a callback URL.

Options

  • url (String): callback URL

List all running tasks.

Development

  1. Install Vagrant

  2. Clone repository

    $ git clone https://github.com/silas/node-mesos.git
  3. Switch to project directory

    $ cd node-mesos
  4. Start VM

    $ vagrant up
  5. Install client dependencies

    $ npm install
  6. Run tests

    $ npm test

License

This work is licensed under the MIT License (see the LICENSE file).