Skip to content
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

Merged
merged 4 commits into from
Aug 16, 2023
Merged

[FEAT] [KV] expose stream metadata #545

merged 4 commits into from
Aug 16, 2023

Conversation

aricart
Copy link
Member

@aricart aricart commented Jun 20, 2023

No description provided.

@aricart aricart requested a review from Jarema June 20, 2023 19:29
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;
Copy link
Collaborator

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.

Copy link
Collaborator

@caspervonb caspervonb Jun 21, 2023

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 ?? {}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are absolutely correct

jetstream/kv.ts Outdated Show resolved Hide resolved
Co-authored-by: Casper Beyer <caspervonb@pm.me>
@aricart aricart temporarily deployed to CI June 23, 2023 16:59 — with GitHub Actions Inactive
Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@aricart aricart merged commit a13a095 into dev Aug 16, 2023
2 checks passed
@aricart aricart deleted the kv-metadata branch August 16, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants