mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
turned off bit logging for bug check
This commit is contained in:
parent
d7a7b253f1
commit
161af565b3
1 changed files with 16 additions and 1 deletions
17
core/http.go
17
core/http.go
|
|
@ -34,6 +34,19 @@ func NewWebService(service *Service) *WebService {
|
|||
return &WebService{service}
|
||||
}
|
||||
|
||||
type Flusher struct {
|
||||
flusher chan bool
|
||||
}
|
||||
|
||||
func (self *Flusher) Handle(w http.ResponseWriter, r *http.Request) {
|
||||
self.flusher <- true
|
||||
}
|
||||
|
||||
func NewFlusher(flusher chan bool) http.HandlerFunc {
|
||||
f := Flusher{flusher}
|
||||
return f.Handle
|
||||
}
|
||||
|
||||
type RequestLogger struct {
|
||||
handler http.HandlerFunc
|
||||
logger chan []byte
|
||||
|
|
@ -135,7 +148,9 @@ func (self *WebService) Run() {
|
|||
mux.HandleFunc("/version", self.HandleVersion)
|
||||
mux.HandleFunc("/ping", self.HandlePing)
|
||||
mux.HandleFunc("/batch", self.HandleBatch)
|
||||
mux.HandleFunc("/set_bits", NewRequestLogger(self.HandleSetBit, logger_chan))
|
||||
//mux.HandleFunc("/set_bits", NewRequestLogger(self.HandleSetBit, logger_chan))
|
||||
mux.HandleFunc("/set_bits", self.HandleSetBit)
|
||||
mux.HandleFunc("/flush", NewFlusher(flusher))
|
||||
s := &http.Server{
|
||||
Addr: ":" + port_string,
|
||||
Handler: mux,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue