GithubHelp home page GithubHelp logo

fake-event-generator's Introduction

fake-event-generator

This homebrew project was a proof of concept that merely devolved into a prop for homework assignments.

Usage

event-gen

The event-gen script supports three modes of output:

  • event-gen stdout will print out to the standard output.
  • event-gen tcp will connect to a tcp server and send events as json documents separated by newlines.
  • event-gen http will connect to a http server and send events as individual documents in HTTP POST requests.

Both commands support the following arguments

-H, --host string   remote host address (default "localhost")
-p, --port uint16   remote port (default 3333)

Global flags include:

-seed int	initialize random number generation with this seed

tcp-server and http-server

Both utilities are provided only as code example for receiving output from event-gen and printing it to the stdout.

Developer guide

Requirements

The provided instructions require the installation of these software installations on your local environment

  • go 1.17+
  • docker for desktop

Testing and running from sources with golang

go test ./...
go run main.go help

Building distribution binaries with docker

A Dockerfile is provided to simplify the compilation of cross-platform binaries for distribution. The following commands will create the binaries in the local ./dist folder when executed at the root of this repository.

Linux or OS X

mkdir -p ./dist
docker build -t builder .
docker run -it --rm -v $(pwd)\dist:/export builder

Windows

mkdir ./dist
docker build -t builder .
docker run -it --rm -v %CD%\dist:/export builder

fake-event-generator's People

Contributors

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