forked from TrueCloudLab/frostfs-node
[#13] neofs-node: Implement Object.Head executor
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
881f49814a
commit
7e91fffd39
1 changed files with 12 additions and 2 deletions
|
@ -78,8 +78,18 @@ func (*objectExecutor) Put(context.Context) (objectService.PutObjectBodyStreamer
|
|||
return new(simplePutBodyStreamer), nil
|
||||
}
|
||||
|
||||
func (*objectExecutor) Head(context.Context, *object.HeadRequestBody) (*object.HeadResponseBody, error) {
|
||||
panic("implement me")
|
||||
func (*objectExecutor) Head(_ context.Context, body *object.HeadRequestBody) (*object.HeadResponseBody, error) {
|
||||
res := new(object.HeadResponseBody)
|
||||
|
||||
hdrPart := new(object.GetHeaderPartShort)
|
||||
shHdr := new(object.ShortHeader)
|
||||
hdrPart.SetShortHeader(shHdr)
|
||||
|
||||
shHdr.SetPayloadLength(100)
|
||||
|
||||
res.SetHeaderPart(hdrPart)
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
||||
func (s *objectExecutor) Search(ctx context.Context, body *object.SearchRequestBody) (objectService.SearchObjectBodyStreamer, error) {
|
||||
|
|
Loading…
Reference in a new issue