SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
better way to handler switch case
Jimmy1c77d323b062
diff --git a/weed/server/volume_server_handlers.go b/weed/server/volume_server_handlers.goindex 6ef79dcdbe..77b1274fd7 100644--- a/weed/server/volume_server_handlers.go+++ b/weed/server/volume_server_handlers.go@@ -23,19 +23,13 @@ security settings:func (vs *VolumeServer) privateStoreHandler(w http.ResponseWriter, r *http.Request) {switch r.Method {- case "GET":- stats.ReadRequest()- vs.GetOrHeadHandler(w, r)- case "HEAD":+ case "GET", "HEAD":stats.ReadRequest()vs.GetOrHeadHandler(w, r)case "DELETE":stats.DeleteRequest()vs.guard.WhiteList(vs.DeleteHandler)(w, r)- case "PUT":- stats.WriteRequest()- vs.guard.WhiteList(vs.PostHandler)(w, r)- case "POST":+ case "PUT", "POST":stats.WriteRequest()vs.guard.WhiteList(vs.PostHandler)(w, r)}