client: Make PrmDial, PrmInit fields public and make setters deprecated #193

Merged
fyrchik merged 2 commits from aarifullin/frostfs-sdk-go:feature/189-prm_dial into master 2024-09-04 19:51:15 +00:00
Member

This PR is initiated by the issue #189

This PR is initiated by the issue [#189](https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/issues/189)
aarifullin added the
discussion
refactoring
labels 2023-11-13 12:37:51 +00:00
aarifullin added 1 commit 2023-11-13 12:37:53 +00:00
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
aarifullin requested review from storage-core-committers 2023-11-13 12:38:12 +00:00
aarifullin requested review from storage-core-developers 2023-11-13 12:38:13 +00:00
aarifullin requested review from storage-services-committers 2023-11-13 12:38:23 +00:00
aarifullin requested review from storage-services-developers 2023-11-13 12:38:23 +00:00
dstepanov-yadro approved these changes 2023-11-13 13:00:14 +00:00
acid-ant approved these changes 2023-11-13 13:34:46 +00:00
fyrchik reviewed 2023-11-14 06:53:09 +00:00
client/client.go Outdated
@ -88,3 +88,3 @@
}
} else {
prm.timeoutDial = 5 * time.Second
prm.DialTimeout = new(time.Duration)
Owner

Do we really want a pointer here? It is a primitive type, <= 0 value can be transform to a default. These 2 lines you wrote will also be needed on the caller side, and they are quite annoying TBH

Do we really want a pointer here? It is a primitive type, `<= 0` value can be transform to a default. These 2 lines you wrote will also be needed on the caller side, and they are quite annoying TBH
Author
Member

Fixed

Fixed
fyrchik marked this conversation as resolved
client/client.go Outdated
@ -178,2 +185,3 @@
// Deprecated: Use PrmInit.ResponseInfoCallback instead.
func (x *PrmInit) SetResponseInfoCallback(f func(ResponseMetaInfo) error) {
x.cbRespInfo = f
x.ResponseInfoCallback = f
Owner

I have not checked this after refactoring, but is it still used?

I have not checked this after refactoring, but is it still used?
Author
Member

If you are asking whether SetResponseInfoCallback is used somewhere - yes, it is:

prmInit.SetResponseInfoCallback(x.opts.ResponseCallback)

If you are asking whether `SetResponseInfoCallback` is used somewhere - yes, it is: https://git.frostfs.info/TrueCloudLab/frostfs-node/src/commit/8088063195f971d10ad7bb7bf5497b214000c5ec/pkg/network/cache/multi.go#L76
fyrchik marked this conversation as resolved
aarifullin force-pushed feature/189-prm_dial from 048cc4ff53 to ae7b3bf97b 2023-11-14 08:14:18 +00:00 Compare
aarifullin requested review from acid-ant 2023-11-14 08:14:57 +00:00
aarifullin requested review from dstepanov-yadro 2023-11-14 08:15:01 +00:00
aarifullin force-pushed feature/189-prm_dial from ae7b3bf97b to 3787477133 2023-11-14 08:18:09 +00:00 Compare
fyrchik approved these changes 2023-11-14 08:26:39 +00:00
fyrchik merged commit 3787477133 into master 2023-11-14 08:27:07 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
No milestone
No project
No assignees
4 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#193
No description provided.