548a81d3e6
[ #48 ] client: Refactor accounting.Balance()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-08-10 11:05:30 +00:00
6353df8bca
[ #142 ] Fix unwrapErr for go 1.20
...
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
2023-08-05 15:58:25 +00:00
936e6d230b
[ #121 ] pool: Add wait params validation for containerPut method
...
* Add WaitParams.CheckValidity() check because SetWaitParams is deprecated,
but parameters were checked within this setter with checkForPositive()
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-08-05 15:58:14 +00:00
9e5faaf829
[ #121 ] client: Make PrmContainerDelete fields public
...
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-08-05 15:58:14 +00:00
3dc8129ed7
[ #135 ] Make all error status receivers pointers
...
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
2023-08-04 08:35:01 +00:00
55c52c8d5d
[ #121 ] pool: Make PrmContainerGet fields public
...
DCO / DCO (pull_request) Successful in 46s
Tests and linters / Lint (pull_request) Successful in 1m33s
Tests and linters / Tests (1.19) (pull_request) Successful in 1m13s
Tests and linters / Tests (1.20) (pull_request) Successful in 1m25s
* Also refactor client PrmContainerGet usage
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-08-03 10:54:13 +03:00
d376302a3b
[ #121 ] client: Make PrmContainerGet fields public
...
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-08-02 18:23:32 +03:00
13d0b170d2
[ #121 ] client: Make pool PrmContainerPut struct fields public
...
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-08-01 09:59:57 +00:00
18a9e4bceb
[ #121 ] client: Make PrmContainerPut struct fields public
...
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-08-01 09:59:57 +00:00
ecb1fef78c
[ #129 ] client: Do not override error status WriteObject()
...
/ DCO (pull_request) Successful in 1m17s
/ Lint (pull_request) Successful in 2m36s
/ Tests (1.19) (pull_request) Successful in 2m14s
/ Tests (1.20) (pull_request) Successful in 6m0s
Here is a scenario:
1. `resolveFrostFSErrors` is false.
2. The first object part was not written, which was signified in status.
3. The second part was written correctly.
Client now thinks that the object is written even though it was not.
In theory we could also return only status, but client-side splitting
is not a single RPC, so it makes sense.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-07-26 14:38:43 +03:00
c359a7465a
[ #64 ] transformer: Simplify interface
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-07-11 07:33:12 +00:00
98cab7ed61
[ #103 ] object: Add PutSingle method code
...
/ DCO (pull_request) Successful in 1m13s
/ Lint (pull_request) Successful in 2m5s
/ Tests (1.19) (pull_request) Successful in 5m58s
/ Tests (1.20) (pull_request) Successful in 6m38s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-07-06 17:06:17 +03:00
769f6eec05
[ #105 ] client: Fix revive linter warning
...
/ DCO (pull_request) Successful in 1m11s
/ Lint (pull_request) Successful in 2m15s
/ Tests (1.19) (pull_request) Successful in 2m7s
/ Tests (1.20) (pull_request) Successful in 1m29s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-07-05 15:52:06 +03:00
2f88460172
[ #83 ] Allow to split objects in the client
...
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-06-28 12:12:37 +00:00
c243b443bc
[ #80 ] objectwriter: Allow custimize maxChunkLen
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-06-26 18:13:04 +03:00
10482ffbed
[ #82 ] client: Allow to pass gRPC dial options
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-05-30 16:51:22 +03:00
9a072a8f49
[ #68 ] Replace interface{} with any
...
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-05-15 17:21:49 +03:00
cae2f37cdd
client: rename formRequest() to buildRequest()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-18 09:58:34 +00:00
f60bea4be5
[ #48 ] client: Refactor SessionCreate()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-18 09:58:34 +00:00
a16fc40c39
[ #48 ] client: Refactor EndpointInfo()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-18 09:58:34 +00:00
40d966bec2
[ #48 ] client: Refactor NetworkInfo()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-18 09:58:34 +00:00
Pavel Karpy
d0c5d837d2
[ #56 ] *: Drop reputation system
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-18 07:52:16 +00:00
591dd1247d
[ #48 ] client: Refactor ContainerPut()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:07:18 +03:00
57619fbbe4
[ #48 ] client: Refactor ContainerSetEACL()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:07:18 +03:00
8bc8f1f365
[ #48 ] client: Refactor ContainerDelete()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:07:18 +03:00
09ed2863fc
[ #48 ] client: Refactor ContainerEACL()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:07:18 +03:00
8e2f77890f
[ #48 ] client: Refactor ContainerGet()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:07:18 +03:00
8852b262f2
[ #48 ] client: Refactor ContainerList()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:07:18 +03:00
b2c66cb99e
[ #48 ] client: Refactor ContainerAnnounceUsedSpace()
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:07:18 +03:00
6c9b92c9dc
[ #48 ] client: Execute metainfo callback in processResponse()
...
It was lost in 8c5333ea55
.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:07:18 +03:00
772fa90983
[ #48 ] client/container: Form requests in a separate function
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-14 09:06:52 +03:00
1bfa9ecdb0
[ #48 ] client: Remove ctx == nil
checks
...
Much less useful after we made context to be passed explicitly.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-13 09:04:09 +03:00
55b06cd764
[ #48 ] client: Split container methods by files
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-13 09:04:09 +03:00
Pavel Karpy
f41860f9bd
[ #46 ] client: Allow set copy_number
for every placement vector
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2023-04-11 10:06:55 +00:00
fa9573e857
[ #47 ] client: Pass context to Dial() explicitly
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-07 08:59:19 +03:00
4cd755877c
[ #47 ] client: Do not check context in NetmapSnapshot()
...
It is passed explicitly, non-nil by convention.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-07 08:59:19 +03:00
708d933fe3
[ #47 ] .golangci.yml: Unify with other FrostFS repos
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-04-07 08:59:19 +03:00
94476f9055
Rename package name
...
Due to source code relocation from GitHub.
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 15:47:21 +03:00
5e759bf089
[ #2 ] Remove panic from RPCs
...
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-03-01 10:29:23 +03:00
4ff9c00de3
[ #4 ] Rename NeoFS mentions in comments and method names
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-30 13:40:50 +03:00
Evgenii Stratonikov
339e2702f8
[ #367 ] client: Allow to override key in Object.Hash RPC
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2022-12-29 16:34:13 +03:00
Pavel Karpy
4c779423f5
Move to frostfs-sdk-go
...
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-14 09:59:29 +03:00
Pavel Karpy
45a6e7a7c2
[ #369 ] status: Make errors return default messages
...
Use default messages in `Error` methods like in `ToStatusV2`.
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-14 09:59:29 +03:00
Leonard Lyubich
d2f3929b51
[ #349 ] client: Use context.Background
in Dial
by default
...
Passing `nil` context to `rpc.Balance` leads to panic. To prevent panic,
we need to provide some default context in `Dial`.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
2022-10-12 17:50:55 +04:00
Leonard Lyubich
452a50e9d5
[ #343 ] client: Accept context parameter in Dial
...
In previous implementation of `Client.Dial` there was no ability to
specify parent context (e.g. global application context).
Add `PrmDial.SetContext` method which accepts optional base dial
context. Use the context to open client connection or fall back to using
`context.Background()`.
Upgraded version of `github.com/nspcc-dev/neofs-api-go/v2` module
also fixes the problem when dial timeout didn't work properly.
Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
2022-10-07 13:24:02 +03:00
Leonard Lyubich
8e3173eacd
[ #270 ] client/netmap: Cover NetMapSnapshot
with unit tests
...
There is a need to test each `Client` operation. In previous
implementation `Client` was based on real socket connection. This didn't
allow to test the `Client` without OS resources. In order to write
convenient and useful unit tests we need to slightly refactor the code.
Introduce `neoFSAPIServer` interface as a provider of `Client` type's
abstraction from the exact NeoFS API server. Add `netMapSnapshot` method
for initial implementation. Define core interface provider used in real
code. Set `coreServer` as an underlying `neoFSAPIServer` in
`Client.Dial`. Cover `Client.NetMapSnapshot` method with unit tests
using the opportunity to override the server.
From now client library can be tested not only with real physical
listeners but with imitations.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-22 10:51:07 +04:00
Leonard Lyubich
89124d442d
[ #312 ] client/netmap: Simplify NetMapSnapshot
implementaiton
...
Make flat set of instructions similar to `ObjectDelete` operation.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-22 10:51:07 +04:00
Leonard Lyubich
664392afc2
[ #312 ] netmap: Support NetmapService.NetmapSnapshot
RPC
...
Extend functionality of `NetMap` type. Add `NetMapSnapshot` operation to
`client` package.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-22 10:51:07 +04:00
Leonard Lyubich
f2f97f656d
[ #315 ] apistatus: Write default message in NodeUnderMaintenance.Error
...
Use `node is under maintenance` message in `NodeUnderMaintenance.Error`
is `message` field is unset in the status message.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-20 11:23:22 +04:00
Leonard Lyubich
be9a1aca90
[ #315 ] apistatus: Support NodeUnderMaintenance
in FromStatusV2
...
Support decoding `NodeUnderMaintenance` status errors in `FromStatusV2`
function.
From now `NodeUnderMaintenance` instance can be decoded from
`status.Status` message of NeoFS API V2 protocol.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-09-20 11:23:22 +04:00