remove register pattern for hooks

This commit is contained in:
Leo Balduf
2016-08-09 16:01:14 -04:00
committed by Jimmy Zelinskie
parent 9a8cdccc6c
commit 732b2d536e
3 changed files with 77 additions and 83 deletions
+4 -4
View File
@@ -15,7 +15,6 @@ import (
"gopkg.in/yaml.v2"
"github.com/jzelinskie/trakr/backend"
httpfrontend "github.com/jzelinskie/trakr/frontend/http"
udpfrontend "github.com/jzelinskie/trakr/frontend/udp"
)
@@ -95,7 +94,8 @@ func main() {
}()
// TODO create PeerStore
trackerBackend, err := backend.New(configFile.Config.BackendConfig, nil)
// TODO create Hooks
trackerBackend, err := backend.New(configFile.Config.BackendConfig, nil, nil, nil, nil, nil)
if err != nil {
return err
}
@@ -108,7 +108,7 @@ func main() {
if configFile.Config.HTTPConfig.Addr != "" {
// TODO get the real TrackerFuncs
hFrontend = httpfrontend.NewFrontend(trackerBackend.TrackerFuncs, configFile.Config.HTTPConfig)
hFrontend = httpfrontend.NewFrontend(trackerBackend, configFile.Config.HTTPConfig)
go func() {
log.Println("started serving HTTP on", configFile.Config.HTTPConfig.Addr)
@@ -120,7 +120,7 @@ func main() {
if configFile.Config.UDPConfig.Addr != "" {
// TODO get the real TrackerFuncs
uFrontend = udpfrontend.NewFrontend(trackerBackend.TrackerFuncs, configFile.Config.UDPConfig)
uFrontend = udpfrontend.NewFrontend(trackerBackend, configFile.Config.UDPConfig)
go func() {
log.Println("started serving UDP on", configFile.Config.UDPConfig.Addr)