Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

itsubaki/gostream-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gostream-server

Stream Processing Server written in Go

install

$ go install github.com/itsubaki/gostream-server@latest

Example

$ GOSTREAM_CONFIG=./config.yml gostream-server
config: {
  "Port":":1234",
  "Router":
    [
      {
        "Plugin":"LogEventPlugin",
        "Path":"/",
        "Query":"select count(*) from LogEvent.time(10 sec)"
      }
    ]
  }
$ curl -s -X POST localhost:1234 -d '{"time":"2017-12-25T12:29:27Z", "Level": 4, "Message":"foobar"}' | jq .
{
  "ID": "002d4f48-6d62-11ec-bf09-367dda957e1c"
}
$ curl -s localhost:1234 | jq .
{
  "time": "2022-01-04T22:27:01.883604+09:00",
  "underlying": {
    "ID": "002d4f48-6d62-11ec-bf09-367dda957e1c",
    "Time": "2017-12-25T12:29:27Z",
    "Level": 4,
    "Message": "foobar"
  },
  "result_set": [
    1
  ]
}

Releases

No releases published

Packages

No packages published