Code Monkey home page Code Monkey logo

sample-augmentor's Introduction

sample-augmentor

Build Status

Sample Data Augmentor for Beeswax

Objectives

The goal of this repository is to provide a sample data augmentor that:

  • Receives an HTTP request
  • Calls out to a Redis database to look up a value
  • Returns a response

Usage

This package uses the Go toolchain to build the binary, and make as a build tool. That is all that is required to build the binary.

$ git clone https://github.com/pswaminathan/sample-augmentor.git
$ cd sample-augmentor
$ make
$ ./augmentor -port 8080 -samplefile testdata/sample_data.json

This creates an in-memory Redis store, loads sample data, and creates an HTTP server. You can then use the Augmentor Requests Generator to send some requests to the server!

$ ./augmentor -samplefile testdata/sample_data.json
2018-03-07T18:52:28-05:00 | [Augmentor] | 200 |      291.42µs | POST    /augment |
2018-03-07T18:52:28-05:00 | [Augmentor] | 200 |     106.396µs | POST    /augment |
2018-03-07T18:52:28-05:00 | [Augmentor] | 204 |     189.378µs | POST    /augment | No segment to augment

In order to build on it and/or work with the vendored packages, you will need dep to manage external Go dependencies, and the protobuf compiler and gogoprotobuf to compile the protos.

TODO

  • Inject dependencies on, e.g., redis.Conn instead of using globals

sample-augmentor's People

Contributors

pswaminathan avatar

Stargazers

 avatar

Watchers

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