Commit graph

44 commits

Author SHA1 Message Date
cc69601b32 [#66] Use gate key to form object owner
This is required because node check session token owner
TrueCloudLab/frostfs-node#528
For client cut TrueCloudLab/frostfs-sdk-go#114
such owner will be gate owner

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-08-07 12:08:34 +03:00
cdaab4feab [#44] add tracing support refactoring
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2023-05-31 15:09:47 +03:00
8a22991326 [#44] add tracing support for upload
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2023-05-29 14:15:54 +03:00
a8ec09e76a [#22] Update system attributes prefix
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-24 11:33:01 +03:00
8f6be59e23 [#18] Extract error details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-03-13 16:14:04 +03:00
e02ee50d7b Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 17:08:53 +03:00
67c5818fc1 [#2] Rename internals
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2022-12-20 18:56:02 +03:00
2d9eee81c2 [#1] Build HTTP Gateway with FrostFS dependencies
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2022-12-15 13:26:08 +03:00
278376643a [#221] add error response on key duplicates
Signed-off-by: Artem Tataurov <a.tataurov@yadro.com>
2022-11-24 18:15:56 +03:00
Denis Kirillov
be47263c42 [#214] Support the Date header on upload
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-11-08 16:20:28 +03:00
Denis Kirillov
3fa0e3caef [#200] Update docs
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-09-16 17:08:20 +03:00
Denis Kirillov
82eba97505 [#200] Unregister metrics on shutdown to fix test
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-09-16 17:08:20 +03:00
Denis Kirillov
ce84dc7068 [#200] Reload upload/download settings on SIGHUP
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-09-16 17:08:20 +03:00
Denis Kirillov
9ebcb6b964 [#188] Update SDK to avoid panic on go1.19
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-08-24 17:57:40 +03:00
Denis Kirillov
0fb75a1cde [#178] Update SDK to v1.0.0-rc.5
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-07-25 14:27:24 +03:00
Denis Kirillov
a42606742a [#142] Support resolving container nicename
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-04-28 17:18:13 +03:00
Denis Kirillov
2b780c1772 [#142] Update SDK
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-04-28 17:18:13 +03:00
Alex Vanin
1e3df95eed [#145] Use application context in NeoFS API requests
It is meaningless to use RequestCtx as a context.Context
for NeoFS operation, because context won't be closed
until application shutdown. Moreover, it also triggers
data race detection, because server's done channel, which
is accessible for reading from RequestCtx, is set to `nil`.

Using application context doesn't change gateway behavior,
but it suppresses data race trigger at shutdown. It also
allows possibility to set configurable timeouts for NeoFS
networking if we will ever need them.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2022-04-22 15:33:11 +04:00
Denis Kirillov
4f2b21a14b [#144] Add more verbose error output
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-04-22 15:14:52 +04:00
Denis Kirillov
5080b43a04 [#139] Update SDK
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-04-08 00:23:12 +04:00
Denis Kirillov
6d362894ad [#132] Update NeoFS SDK to v1.0.0-rc.3
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-16 17:15:21 +03:00
Denis Kirillov
acd8bbb34b [#129] Fix race condition tests
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2022-03-11 13:56:49 +03:00
Leonard Lyubich
03985f2eda [#126] Upgrade NeoFS SDK Go to 2nd release candidate v1.0.0
Avoid using the deprecated elements.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 18:25:53 +03:00
Leonard Lyubich
2b7e4a36fb [#126] Upgrade NeoFS SDK Go library
Core changes:
  - `object.ID` moved to new package `oid`;
  - `object.Address` moved to new package `address`;
  - `pool.Object` interface changes.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-03-03 18:25:53 +03:00
Denis Kirillov
567f54d82d [#115] Fix tests
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-12-10 10:59:43 +03:00
Denis Kirillov
71e846a4fc [#115] Update sdk version to support priority
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-12-10 10:59:43 +03:00
Angira Kekteeva
dbbc9e05cf [#111] Move attributes to a separate file
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-12-09 16:12:13 +03:00
Denis Kirillov
cd0633cda0 [#108] Add different expiration header formats
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-29 15:42:32 +03:00
Alex Vanin
79765fb7cc [#106] Update neofs-sdk-go to the latest version
Includes:
 - fix for unavailable endpoints of client pool,
 - session token cache with request retry in case
   of missing session token,
 - migrated neofs client.
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-11-15 14:46:50 +03:00
Denis Kirillov
6265fcb26a [#105] Add newline to errors
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-11-12 15:32:18 +03:00
Denis Kirillov
fffb0b2f12 [#63] Using client.Object from sdk
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
2021-06-15 11:28:30 +03:00
Roman Khimov
e177e1c9ae *: use client.Object where appropriate
It's enough to do the job, we don't really need full client.Client interface
here.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2021-06-11 11:54:30 +03:00
Angira Kekteeva
2f8ab7cb8d [#57] downloader, uploader: Replace deprecated
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-06-04 15:55:56 +03:00
Roman Khimov
e8b94553c3 *: update to use unneofsed sdk-go
Signed-off-by: Roman Khimov <roman@nspcc.ru>
2021-05-31 23:07:01 +03:00
Angira Kekteeva
82b2126bfd [#46] *: Remove moved to sdk packages, refactoring
Removed connections, logger, neofs because they were moved to sdk repo.
Made changes in downloader, uploader, main.go and app.go via
refactoring of neofs.
Replaced dependencies to removed packages by sdk packages.

Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-05-28 14:45:46 +03:00
Angira Kekteeva
33b1a28bf1 Replace http-gate by http-gw in files
Signed-off-by: Angira Kekteeva <kira@nspcc.ru>
2021-05-18 15:14:36 +03:00
Roman Khimov
df3c87af79 *: fix all comment-related golint warnings
Some of this code is going to be moved to SDK library, so it's important.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
2021-05-13 18:57:42 +03:00
Roman Khimov
ed3c576b70 uploader: drain body buffer before ending request processing
Fixes

2021-04-28T00:03:36.514+0300    debug   uploader/upload.go:64   close temporary multipart/form file     {"cid": "Dxhf4PNprrJHWWTG5RGLdfLkJiSQ3AQqit1MSnEPRkDZ", "address": "Dxhf4PNprrJHWWTG5RGLdfLkJiSQ3AQqit1MSnEPRkDZ/2m8PtaoricLouCn5zE8hAFr3gZEBDCZFe9BEgVJTSocX", "filename": "vid.mp4"}
2021/04/28 00:03:36 error when serving connection "127.0.0.1:8082"<->"127.0.0.1:41390": error when reading request headers: cannot find http request method in "0\r\n\r\n". Buffer size=5, contents: "0\r\n\r\n"
2021-04-30 14:31:14 +03:00
Roman Khimov
464a0134bd neofs: drop PrepareObjectOnsite option
It's using NeoFS node internal packages which shouldn't ever be used in gate
code, it's not adding any value to the code we have (standard api-go
interfaces work fine).
2021-04-30 14:31:14 +03:00
Roman Khimov
b020cd6652 uploader: fix passing attributes to object 2021-04-30 14:31:14 +03:00
Pavel Korotkov
fad05b76d4 Put artifacts into pool solely
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
2021-04-08 12:39:29 +03:00
Pavel Korotkov
62a03251ce Add connection pool implementation (part 1)
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
2021-04-06 12:19:21 +03:00
Pavel Korotkov
3a5d9fe94c [#19] Extract downloading logic into a separate package
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
2021-04-06 12:19:21 +03:00
Pavel Korotkov
eb92219e14 [#19] Extract uploading logic into a separate package
Signed-off-by: Pavel Korotkov <pavel@nspcc.ru>
2021-04-06 12:19:21 +03:00
Renamed from upload.go (Browse further)