[#121] client: Make PrmObjectGet/Head/GetRange fields public #153
No reviewers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-services-developers
Labels
No labels
P0
P1
P2
P3
good first issue
pool
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-sdk-go#153
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-sdk-go:feature/121-prm_object_get"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
10884a7d11
to84e7e69f98
@ -90,4 +25,2 @@
// PrmObjectGet groups parameters of ObjectGetInit operation.
type PrmObjectGet struct {
prmObjectRead
It breaks backward compatibility. Is it ok?
I can agree that this refactoring looks a little bit aggressive, but it depends on the point how we consider supporting the backward compatibility.
I suppose you're talking about using the setters
From the point of the usage in
frostfs-node
such refactoring won't be painful.Another option it is to make:
that means that from the client side I need to construct
PrmObjectGet
like that:I don't like this idea to gather common fields in one struct and then impose the such constructor because of specific implementation
I just wanted to highlight that the client code won't compile without changes if we update the SDK this way. if we do it consciously then ok
Sure, the client must be updated
Can we retain all the methods with similar
Deprecated:
warning?Not that it matters a lot, but it also seems not painful to do.
I have removed
prmObjectRead
out fromPrmObjectGet/Head/GetRange
and thus these methods do not inherit the setters. If we want to keep these methods, I need to define "deprecated" method for these three structs.Also, some types have been reworked because it was:
FromContainer
andByID
were used to setaddr
(api-type). As I said, I think parameters should keep only sdk types but not api (that is waycid.ID, oid.ID
are introduced). So, we cannot keep these setters@ -490,0 +545,4 @@
return nil, errorMissingObject
}
if len(prm.XHeaders)%2 != 0 {
I think length/offset check is also required.
Length check already exists (see above)
Do we need to check the offset field? I mean, what should we check for the offset?
Ups, my bad