client: Simplify netmap/session methods #55

Merged
fyrchik merged 4 commits from fyrchik/frostfs-sdk-go:netmap-refactor into master 2023-04-18 09:58:35 +00:00
There is no content yet.
fyrchik requested review from storage-core-committers 2023-04-14 13:37:50 +00:00
fyrchik requested review from storage-core-developers 2023-04-14 13:37:51 +00:00
fyrchik requested review from storage-services-committers 2023-04-14 13:37:58 +00:00
fyrchik requested review from storage-services-developers 2023-04-14 13:37:59 +00:00
ale64bit reviewed 2023-04-14 13:50:30 +00:00
client/netmap.go Outdated
@ -19,6 +19,16 @@ type PrmEndpointInfo struct {
prmCommonMeta
}
func (x *PrmEndpointInfo) formRequest(c *Client) (*v2netmap.LocalNodeInfoRequest, error) {
Collaborator

can we call it buildRequest, asRequest or simply request instead? Maybe I'm biased, but this sounds more like "requesting a form" than "forming a request" :)

can we call it `buildRequest`, `asRequest` or simply `request` instead? Maybe I'm biased, but this sounds more like "requesting a form" than "forming a request" :)
Collaborator

or toRequest

or `toRequest`
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
Poster
Owner

Fixed

Fixed
aarifullin reviewed 2023-04-17 06:54:38 +00:00
client/netmap.go Outdated
@ -113,0 +92,4 @@
verV2 := body.GetVersion()
if verV2 == nil {
return &res, newErrMissingResponseField(fieldVersion)
Collaborator

I think it's more natural to return nil instead &res in the error case

I think it's more natural to return `nil` instead `&res` in the error case
Poster
Owner

Fixed. I don't really have arguments, besides returning status if we already have it. You suggestion is backwards compatible, however.

Fixed. I don't really have arguments, besides returning status if we already have it. You suggestion is backwards compatible, however.
fyrchik force-pushed netmap-refactor from 945ac2f58c to 3d2219e722 2023-04-17 07:31:51 +00:00 Compare
fyrchik force-pushed netmap-refactor from 3d2219e722 to 30121b9788 2023-04-17 07:35:21 +00:00 Compare
acid-ant approved these changes 2023-04-17 07:43:46 +00:00
dstepanov-yadro approved these changes 2023-04-17 07:52:44 +00:00
fyrchik merged commit cae2f37cdd into master 2023-04-18 09:58:35 +00:00
fyrchik deleted branch netmap-refactor 2023-04-18 09:58:35 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
No Milestone
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#55
There is no content yet.