forked from TrueCloudLab/frostfs-http-gw
Refactoring HTTP Gate
- simplify code - add `/get_by_attribute` - refactoring receiving object Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
parent
b6a9654546
commit
abd95efe47
2 changed files with 118 additions and 41 deletions
4
app.go
4
app.go
|
@ -175,7 +175,9 @@ func (a *app) Serve(ctx context.Context) {
|
|||
r.RedirectTrailingSlash = true
|
||||
|
||||
a.log.Info("enabled /get/{cid}/{oid}")
|
||||
r.GET("/get/{cid}/{oid}", a.receiveFile)
|
||||
r.GET("/get/{cid}/{oid}", a.byAddress)
|
||||
a.log.Info("enabled /get_by_attribute/{cid}/{attr_key}/{attr_val}")
|
||||
r.GET("/get_by_attribute/{cid}/{attr_key}/{attr_val}", a.byAttribute)
|
||||
|
||||
// attaching /-/(ready,healthy)
|
||||
attachHealthy(r, a.pool.Status)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue