Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9785637b3b | ||
|
728b34b684 |
@@ -12,12 +12,6 @@ const (
|
|||||||
pathStreamWAL = "stream-wal"
|
pathStreamWAL = "stream-wal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (rep *Replicator) RegisterHandlers(mux *http.ServeMux, rootPath string) {
|
|
||||||
mux.HandleFunc(path.Join(rootPath, pathGetInfo), rep.handleGetInfo)
|
|
||||||
mux.HandleFunc(path.Join(rootPath, pathSendState), rep.handleSendState)
|
|
||||||
mux.HandleFunc(path.Join(rootPath, pathStreamWAL), rep.handleStreamWAL)
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Remove this!
|
// TODO: Remove this!
|
||||||
func (rep *Replicator) Handle(w http.ResponseWriter, r *http.Request) {
|
func (rep *Replicator) Handle(w http.ResponseWriter, r *http.Request) {
|
||||||
// We'll handle two types of requests: HTTP GET requests for JSON, or
|
// We'll handle two types of requests: HTTP GET requests for JSON, or
|
||||||
|
@@ -73,6 +73,10 @@ type Database struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func New(conf Config) *Database {
|
func New(conf Config) *Database {
|
||||||
|
if conf.NetTimeout <= 0 {
|
||||||
|
conf.NetTimeout = time.Minute
|
||||||
|
}
|
||||||
|
|
||||||
if conf.MaxConcurrentUpdates <= 0 {
|
if conf.MaxConcurrentUpdates <= 0 {
|
||||||
conf.MaxConcurrentUpdates = 32
|
conf.MaxConcurrentUpdates = 32
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user