Add stub clessy-stats
This commit is contained in:
parent
6f7ca6c91c
commit
448fd8e294
3 changed files with 35 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
config.json
|
config.json
|
||||||
clessy-broker
|
clessy-broker
|
||||||
clessy-mods
|
clessy-mods
|
||||||
|
clessy-stats
|
18
Makefile
18
Makefile
|
@ -1,8 +1,16 @@
|
||||||
all: clessy-broker
|
all: clessy-broker clessy-mods clessy-stats
|
||||||
|
|
||||||
clessy-broker:
|
install-tg:
|
||||||
go build -o clessy-broker ./broker
|
go install github.com/hamcha/clessy/tg
|
||||||
go build -o clessy-mods ./mods
|
|
||||||
|
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:
|
clean:
|
||||||
rm -f clessy-broker clessy-mods
|
rm -f clessy-broker clessy-mods clessy-stats
|
20
stats/main.go
Normal file
20
stats/main.go
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
Reference in a new issue