GithubHelp home page GithubHelp logo

rrs45 / gosensu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bencaron/gosensu

0.0 1.0 0.0 38 KB

Sensu API Client in Go - Golang wrapper around the Sensu API

License: MIT License

Makefile 1.19% Go 98.81%

gosensu's Introduction

gosensu

Gosensu is an golang wrapper around the Sensu API. It's a convenient wrapper to make REST calls to the Sensu API. It is used by the Golang version of the backend for Uchiwa.

Usage

A quick example:

sensu := New("My sensu API", "", "http://your.SENSU_SERVER_URL.tld"), 15, "username", "secret")
events = sensu.GetEvents()

See the included godoc documentation for more information about usage.

Caveats

This library is the first aim of the authors at Golang. Thank you for any feedback for improvement on styles or golang idioms!

Contributing

Everyone is welcome to submit patches. Whether your pull request is a bug fix or introduces new classes or functions to the project, we kindly ask that you include tests for your changes. Even if it's just a small improvement, a test is necessary to ensure the bug is never re-introduced.

Testing

Some tests are included with this project (remember, the author is still a noob ;)). Testing an API wrapper is always somewhat a challenge since mocking everything can be challenging and having a full blown client cumbersome.

A quick testing can be done by running 'make canned' which will test against a Canned powered mockup of the API (driven by static JSON files, via Node's canned), running in an Heroku setup.

More "real" testing can be done by running "make test" that will be runned against a local installation of sensu (currenctly hardcoded to localhost port 8889). This code have been developped against a VM built so support Uchiwa's developpement that can be found at https://github.com/palourde/uchiwa-sensu

We recommend to run these tests (or even better, improve them!) before submitting a Pull Request.

Authors

License

MIT (see LICENSE)

gosensu's People

Contributors

bencaron avatar bobtfish avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.