forked from TrueCloudLab/frostfs-http-gw
[#200] Reload resolvers on SIGHUP
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
939f5f0c65
commit
1e05d8a935
3 changed files with 116 additions and 55 deletions
|
@ -13,9 +13,7 @@ func GetContainerID(ctx context.Context, containerID string, resolver *resolver.
|
|||
cnrID := new(cid.ID)
|
||||
err := cnrID.DecodeString(containerID)
|
||||
if err != nil {
|
||||
if resolver != nil {
|
||||
cnrID, err = resolver.Resolve(ctx, containerID)
|
||||
}
|
||||
cnrID, err = resolver.Resolve(ctx, containerID)
|
||||
}
|
||||
return cnrID, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue