- 
                Notifications
    
You must be signed in to change notification settings  - Fork 100
 
chore: add size to iter with attributes #218
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
base: main
Are you sure you want to change the base?
chore: add size to iter with attributes #218
Conversation
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.
Should we name it SizeBytes to avoid any kind of confusion over what are the units?
Signed-off-by: Michael Hoffmann <[email protected]>
9bcf9fb    to
    3eea046      
    Compare
  
    
          
 Yeah we can do that! Ill also implement it for the other providers a bit later!  | 
    
| for _, blob := range resp.Segment.BlobItems { | ||
| attrs := objstore.IterObjectAttributes{ | ||
| Name: *blob.Name, | ||
| Size: *blob.Properties.ContentLength, | 
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.
SizeBytes would be preferable, I think!
| 
               | 
          ||
| type IterObjectAttributes struct { | ||
| Name string | ||
| Size int64 | 
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.
Can the size be negative? Maybe let's use uint64.
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.
Maybe as a canary for "this provider does not expose a size in iter"; idk if there is such a provider though
Changes
Verification