summaryrefslogtreecommitdiff
path: root/src/rhimportd/ctrlWeb.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/rhimportd/ctrlWeb.go')
-rw-r--r--src/rhimportd/ctrlWeb.go15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/rhimportd/ctrlWeb.go b/src/rhimportd/ctrlWeb.go
index c1cd4b5..46e384a 100644
--- a/src/rhimportd/ctrlWeb.go
+++ b/src/rhimportd/ctrlWeb.go
@@ -26,6 +26,7 @@ package main
import (
"helsinki.at/rhimport"
+ "helsinki.at/rhrd-go/rddb"
"net/http"
_ "net/http/pprof"
"time"
@@ -33,21 +34,21 @@ import (
type webHandler struct {
*rhimport.Config
- *rhimport.RdDbChan
+ *rddb.DBChan
*rhimport.SessionStoreChan
trusted bool
- H func(*rhimport.Config, *rhimport.RdDbChan, *rhimport.SessionStoreChan, bool, http.ResponseWriter, *http.Request)
+ H func(*rhimport.Config, *rddb.DBChan, *rhimport.SessionStoreChan, bool, http.ResponseWriter, *http.Request)
}
func (self webHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
- self.H(self.Config, self.RdDbChan, self.SessionStoreChan, self.trusted, w, r)
+ self.H(self.Config, self.DBChan, self.SessionStoreChan, self.trusted, w, r)
}
-func StartControlWeb(addr string, conf *rhimport.Config, rddb *rhimport.RdDbChan, sessions *rhimport.SessionStoreChan) {
- http.Handle("/public/simple", webHandler{conf, rddb, sessions, false, webSimpleHandler})
- // http.Handle("/trusted/simple", webHandler{conf, rddb, sessions, true, webSimpleHandler})
+func StartControlWeb(addr string, conf *rhimport.Config, db *rddb.DBChan, sessions *rhimport.SessionStoreChan) {
+ http.Handle("/public/simple", webHandler{conf, db, sessions, false, webSimpleHandler})
+ // http.Handle("/trusted/simple", webHandler{conf, db, sessions, true, webSimpleHandler})
- http.Handle("/public/socket", webHandler{conf, rddb, sessions, false, webSocketHandler})
+ http.Handle("/public/socket", webHandler{conf, db, sessions, false, webSocketHandler})
rhl.Println("web-ctrl: listening on", addr)
server := &http.Server{Addr: addr, ReadTimeout: 60 * time.Second, WriteTimeout: 60 * time.Second}