-
Notifications
You must be signed in to change notification settings - Fork 49
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
[FEAT] [KV] expose stream metadata
#545
Conversation
jetstream/kv.ts
Outdated
@@ -917,6 +920,10 @@ export class KvStatusImpl implements KvStatus { | |||
get size(): number { | |||
return this.si.state.bytes; | |||
} | |||
|
|||
get metadata(): Record<string, string> | undefined { | |||
return this.si.config.metadata; |
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.
Sure you don't want to default to an empty object when undefined? less cognitive overload on the caller.
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.
Also looks like object store does return ?? {}
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.
you are absolutely correct
Co-authored-by: Casper Beyer <caspervonb@pm.me>
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.
lgtm
No description provided.