Add stub clessy-stats

This commit is contained in:
Hamcha 2016-02-09 15:00:50 +00:00
parent 6f7ca6c91c
commit 448fd8e294
3 changed files with 35 additions and 6 deletions

3
.gitignore vendored
View file

@ -1,3 +1,4 @@
config.json
clessy-broker
clessy-mods
clessy-mods
clessy-stats

View file

@ -1,8 +1,16 @@
all: clessy-broker
all: clessy-broker clessy-mods clessy-stats
clessy-broker:
go build -o clessy-broker ./broker
go build -o clessy-mods ./mods
install-tg:
go install github.com/hamcha/clessy/tg
clessy-broker: install-tg
go build -o clessy-broker github.com/hamcha/clessy/broker
clessy-mods: install-tg
go build -o clessy-mods github.com/hamcha/clessy/mods
clessy-stats: install-tg
go build -o clessy-stats github.com/hamcha/clessy/stats
clean:
rm -f clessy-broker clessy-mods
rm -f clessy-broker clessy-mods clessy-stats

20
stats/main.go Normal file
View file

@ -0,0 +1,20 @@
package main
import (
"flag"
"github.com/hamcha/clessy/tg"
)
func process(broker *tg.Broker, update tg.APIMessage) {
}
func main() {
brokerAddr := flag.String("broker", "localhost:7314", "Broker address:port")
flag.Parse()
err := tg.CreateBrokerClient(*brokerAddr, process)
if err != nil {
panic(err)
}
}