-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node: Serve NetmapService.NetmapSnapshot
RPC
#1793
node: Serve NetmapService.NetmapSnapshot
RPC
#1793
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1793 +/- ##
==========================================
+ Coverage 33.41% 33.66% +0.24%
==========================================
Files 352 352
Lines 23962 23737 -225
==========================================
- Hits 8008 7991 -17
+ Misses 15287 15081 -206
+ Partials 667 665 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There is no more need to serve the same request on Control API. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
da1067a
to
3cc784a
Compare
There is no more need to serve the same request on Control API. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
3cc784a
to
9973911
Compare
There is no more need to serve the same request on Control API. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
9973911
to
0f8b975
Compare
cmd/neofs-node/config.go
Outdated
netMap atomicstd.Value // type netmap.NetMap | ||
} | ||
|
||
func (c *cfg) ProcessCurrentNetMap(f func(netmap.NetMap)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just getter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The need is to perform exact single action. We could implement it as a getter, doesn' matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think CurrentNetmap() netmap.NetMap
is simpler to read and use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally I've decided to leave netmap
service package a dummy message constructor. All the business logic is implemented on application side. 0e7bc5d
There is no more need to serve the same request on Control API. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
932c24d
0f8b975
to
932c24d
Compare
…map reader Replace `ProcessCurrentNetMap` method of `NodeState` interface with `ReadCurrentNetMap` one with two changes: * Replace network map type from NeoFS SDK package with the protocol-generated message. This replaces all the business logic to the application layer. * Support error return. This allows to cover problem node states. Return an error from `NodeState.ReadCurrentNetMap` method implemeted through `atomic.Value` if `Store` method has not been called yet. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
There is no more need to serve the same request on Control API. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
…map reader Replace `ProcessCurrentNetMap` method of `NodeState` interface with `ReadCurrentNetMap` one with two changes: * Replace network map type from NeoFS SDK package with the protocol-generated message. This replaces all the business logic to the application layer. * Support error return. This allows to cover problem node states. Return an error from `NodeState.ReadCurrentNetMap` method implemeted through `atomic.Value` if `Store` method has not been called yet. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
There is no more need to serve the same request on Control API.
NetmapService.NetmapSnapshot
RPC neofs-sdk-go#337