mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 20:06:19 +08:00
add more error handling, adjust volume size to 32G
git-svn-id: https://weed-fs.googlecode.com/svn/trunk@32 282b0af5-e82d-9cf1-ede4-77906d7719d0
This commit is contained in:
@@ -29,6 +29,10 @@ var (
|
||||
func statusHandler(w http.ResponseWriter, r *http.Request) {
|
||||
writeJson(w, r, store.Status())
|
||||
}
|
||||
func addVolumeHandler(w http.ResponseWriter, r *http.Request) {
|
||||
store.AddVolume(r.FormValue("volume"))
|
||||
writeJson(w, r, store.Status())
|
||||
}
|
||||
func storeHandler(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.Method {
|
||||
case "GET":
|
||||
@@ -133,6 +137,7 @@ func main() {
|
||||
defer store.Close()
|
||||
http.HandleFunc("/", storeHandler)
|
||||
http.HandleFunc("/status", statusHandler)
|
||||
http.HandleFunc("/add_volume", addVolumeHandler)
|
||||
|
||||
go func() {
|
||||
for {
|
||||
|
Reference in New Issue
Block a user