microservice

command
v0.0.0-...-1e6017f Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 9 Imported by: 0

README

Here contains an example to show how to build a http based event queue service with futurama.

  • microservice allows you to schedule a http call to any url at specified time.
  • By posting below json to /add api, microservice will post data to http://127.0.0.1:8765/downstream/call at $UNIX_TIMESTAMP
{
  "trigger_time": $UNIX_TIMESTAMP,
  "trigger_type": "http",
  "host": 127.0.0.1,
  "port": 8765,
  "path": "/downstream/call",
  "data": {
    "a": 1,
    "b": "x"
  }
}

Build

$ go get
$ go build

compiled binary microservice should be found in this directory.

Start server & Test

$ ./microservice --config ./dev.json --logtostderr &
$ ./schedule_event.sh 8765

8765 is the default port used by microservice

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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