Add stub clessy-stats
This commit is contained in:
parent
6f7ca6c91c
commit
448fd8e294
3 changed files with 35 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
|||
config.json
|
||||
clessy-broker
|
||||
clessy-mods
|
||||
clessy-stats
|
18
Makefile
18
Makefile
|
@ -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
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