Evgenii Stratonikov
94f068e462
*: remove error from StableMarshal
return values
...
We marshal only in-memory structures, no error is expected.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-04-21 15:07:57 +03:00
Evgenii Stratonikov
84d981e88e
util/proto: do not return error from primitive marshalers
...
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-04-21 15:07:57 +03:00
Evgenii Stratonikov
732dd51b1b
[ #388 ] *: Remove nil check from setters
...
I knew one day `sed` would save me an hour of manual work:
```
sed -i -n -e '
s/) Set/) Set/
p
t setter
b end
:setter
n
s/nil/nil/
t hasif
p
b end
:hasif
n
:loop
p
n
s/}/}/
t end
b loop
:end
' $@
goimports -w $@
```
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-31 11:32:04 +03:00
Evgenii Stratonikov
84daaf59ef
[ #376 ] refs: Replace []*ObjectID with []ObjectID
...
```
ObjectIDSlice/0_elements/to_grpc_message-8 5.64ns ± 2% 5.89ns ± 4% +4.56% (p=0.000 n=10+10)
ObjectIDSlice/0_elements/from_grpc_message-8 6.68ns ± 3% 6.81ns ± 8% ~ (p=0.143 n=10+10)
ObjectIDSlice/0_elements/marshal-8 7.41ns ± 3% 7.91ns ± 4% +6.63% (p=0.000 n=10+10)
ObjectIDSlice/1_elements/to_grpc_message-8 69.8ns ± 3% 80.5ns ± 7% +15.39% (p=0.000 n=10+10)
ObjectIDSlice/1_elements/from_grpc_message-8 56.4ns ± 6% 34.7ns ± 5% -38.55% (p=0.000 n=10+9)
ObjectIDSlice/1_elements/marshal-8 68.4ns ± 4% 67.6ns ± 4% ~ (p=0.404 n=10+10)
ObjectIDSlice/50_elements/to_grpc_message-8 2.52µs ± 7% 2.56µs ± 4% ~ (p=0.315 n=10+9)
ObjectIDSlice/50_elements/from_grpc_message-8 1.83µs ± 8% 0.44µs ± 1% -75.73% (p=0.000 n=10+8)
ObjectIDSlice/50_elements/marshal-8 2.32µs ±17% 2.22µs ± 3% ~ (p=0.247 n=10+10)
name old alloc/op new alloc/op delta
ObjectIDSlice/0_elements/to_grpc_message-8 0.00B 0.00B ~ (all equal)
ObjectIDSlice/0_elements/from_grpc_message-8 0.00B 0.00B ~ (all equal)
ObjectIDSlice/0_elements/marshal-8 0.00B 0.00B ~ (all equal)
ObjectIDSlice/1_elements/to_grpc_message-8 72.0B ± 0% 72.0B ± 0% ~ (all equal)
ObjectIDSlice/1_elements/from_grpc_message-8 32.0B ± 0% 24.0B ± 0% -25.00% (p=0.000 n=10+10)
ObjectIDSlice/1_elements/marshal-8 48.0B ± 0% 48.0B ± 0% ~ (all equal)
ObjectIDSlice/50_elements/to_grpc_message-8 3.62kB ± 0% 3.62kB ± 0% ~ (all equal)
ObjectIDSlice/50_elements/from_grpc_message-8 1.62kB ± 0% 1.28kB ± 0% -20.79% (p=0.000 n=10+10)
ObjectIDSlice/50_elements/marshal-8 2.05kB ± 0% 2.05kB ± 0% ~ (all equal)
name old allocs/op new allocs/op delta
ObjectIDSlice/0_elements/to_grpc_message-8 0.00 0.00 ~ (all equal)
ObjectIDSlice/0_elements/from_grpc_message-8 0.00 0.00 ~ (all equal)
ObjectIDSlice/0_elements/marshal-8 0.00 0.00 ~ (all equal)
ObjectIDSlice/1_elements/to_grpc_message-8 2.00 ± 0% 2.00 ± 0% ~ (all equal)
ObjectIDSlice/1_elements/from_grpc_message-8 2.00 ± 0% 1.00 ± 0% -50.00% (p=0.000 n=10+10)
ObjectIDSlice/1_elements/marshal-8 1.00 ± 0% 1.00 ± 0% ~ (all equal)
ObjectIDSlice/50_elements/to_grpc_message-8 51.0 ± 0% 51.0 ± 0% ~ (all equal)
ObjectIDSlice/50_elements/from_grpc_message-8 51.0 ± 0% 1.0 ± 0% -98.04% (p=0.000 n=10+10)
ObjectIDSlice/50_elements/marshal-8 1.00 ± 0% 1.00 ± 0% ~ (all equal)
```
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-03-15 12:19:49 +03:00
Leonard Lyubich
99370889d1
[ #371 ] Support recent changes in NeoFS API protocol
...
Support:
* new status codes (object, container, session);
* object `Lock` message;
* different signature schemes.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-02-25 10:24:07 +03:00
Leonard Lyubich
e9a8451fb7
[ #367 ] *: Re-compile proto files of NeoFS API protocol
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2022-01-14 13:17:21 +03:00
Leonard Lyubich
0f09f0dfc6
Re-compile NeoFS API proto files using updated script
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-17 15:29:33 +03:00
Leonard Lyubich
25da5d2e13
Add v2
version to go module name
...
Replace all elements from `v2` to root directory.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-11-17 15:29:33 +03:00
Alex Vanin
1f143e54bd
Move api-v2 files into v2 subdir
...
This subdir contains generated proto files
and small wrappers.
2020-09-18 10:40:17 +03:00
Leonard Lyubich
0ee1c3653d
Implement field setters on all protobuf messages
...
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-09-18 10:40:17 +03:00
Alex Vanin
fabdd78d63
Add pre-release jindo branch
2020-09-18 10:39:50 +03:00
Alex Vanin
0a5d0ff1a2
Remove v1 code
2020-09-18 10:39:45 +03:00
Evgeniy Kulikov
b118f469d2
Migrate to new repo
2020-03-31 10:05:26 +03:00
Evgeniy Kulikov
49cc731c8d
update proto files, regenerate pb.go
2020-02-05 16:58:06 +03:00
Evgeniy Kulikov
53af48372f
prepare to rename neofs-proto to neofs-api
2020-01-30 16:35:30 +03:00
Evgeniy Kulikov
0fce8a6ba2
proto: publish sg lib, rewrite object
2019-12-02 19:46:15 +03:00