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

[ADDED] Listing buckets and bucket names #1074

Merged
merged 2 commits into from Sep 15, 2022
Merged

Conversation

piotrpio
Copy link
Collaborator

Resolves #1008

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

They Buckets or Objects?

@coveralls
Copy link

coveralls commented Sep 12, 2022

Coverage Status

Coverage decreased (-0.06%) to 85.653% when pulling 23f05f8 on object-store-list-buckets into a1017ee on main.

@piotrpio
Copy link
Collaborator Author

@derekcollison not sure I get it. These methods list buckets only (as per #1008)

@derekcollison
Copy link
Member

Apologies, so this is to list all object stores in an account, got it.

@piotrpio
Copy link
Collaborator Author

Yep, I think if that looks good it might be a good idea to do the same thing for KV buckets

object.go Outdated
@@ -44,6 +44,10 @@ type ObjectStoreManager interface {
CreateObjectStore(cfg *ObjectStoreConfig) (ObjectStore, error)
// DeleteObjectStore will delete the underlying stream for the named object.
DeleteObjectStore(bucket string) error
// BucketNames is used to retrieve a list of bucket names
BucketNames(opts ...ObjectOpt) <-chan string
Copy link
Member

Choose a reason for hiding this comment

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

Maybe StoreNames and Stores?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm, makes sense as we mostly use ObjectStore instead of Bucket elsewhere. What about ObjectStoreNames and ObjectStores? Just to make it more obvious when using JetStreamContext interface.

Copy link
Member

Choose a reason for hiding this comment

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

We need to keep StreamsInfo but let's make alias for Streams() and that will be consistent imo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@derekcollison
Copy link
Member

Naming stuff is hard ;)

Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

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

LGTM

@piotrpio piotrpio merged commit 225c557 into main Sep 15, 2022
@piotrpio piotrpio deleted the object-store-list-buckets branch September 15, 2022 12:00
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.

Object Store API: list buckets
3 participants