mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
Move remote disk StorageAPI abstraction from RPC to REST (#6464)
This commit is contained in:
committed by
kannappanr
parent
670f9788e3
commit
81bee93b8d
10
cmd/utils.go
10
cmd/utils.go
@@ -458,3 +458,13 @@ func CloseResponse(respBody io.ReadCloser) {
|
||||
respBody.Close()
|
||||
}
|
||||
}
|
||||
|
||||
// Used for registering with rest handlers (have a look at registerStorageRESTHandlers for usage example)
|
||||
// If it is passed ["aaaa", "bbbb"], it returns ["aaaa", "{aaaa:.*}", "bbbb", "{bbbb:.*}"]
|
||||
func restQueries(keys ...string) []string {
|
||||
var accumulator []string
|
||||
for _, key := range keys {
|
||||
accumulator = append(accumulator, key, "{"+key+":.*}")
|
||||
}
|
||||
return accumulator
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user