starboost

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 20 Imported by: 0

README

starboost

Kafka Event Client Tool

  • Publish message via Rest API
  • Configurable consume message

Installation

  1. Download the binary file on release page
  2. Create yaml config file based on example below

Example Config

# config.yaml
address: localhost:8123
debug: false
kafka:
  addresses:
    - localhost:9092
consumer:
  enabled: true
  groupId: starboost
  topics:
    - paybill
    - tap_snap
  output:
    stdout: true
    file: starboost.log

Usage

Run starboost

$ ./starboost --config=config.yaml
Publish

Publish message via endpoint POST /publish. You can use cURL or Rest Client.

Example 1

curl --location --request POST 'localhost:8123/publish' \
--header 'Content-Type: application/json' \
--data-raw '{
    "topic": "paybill",
    "message": "some message"
}'

Example 2

curl --location --request POST 'localhost:8123/publish' \
--header 'Content-Type: application/json' \
--data-raw '{
    "topic": "paybill",
    "message": {
        "foo": "bar"
    }
}'
Consume

You can see the incoming messages on your terminal or log file based on consumer output config.

Example Config

consumer:
  ...
  output:
    stdout: true
    file: starboost.log

TODO

  • Filterable on consuming messages
  • Dockerize

Contributing

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL