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
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.
They Buckets or Objects?
@derekcollison not sure I get it. These methods list buckets only (as per #1008) |
Apologies, so this is to list all object stores in an account, got it. |
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 |
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 StoreNames and Stores?
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.
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.
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.
We need to keep StreamsInfo but let's make alias for Streams() and that will be consistent imo.
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.
done
Naming stuff is hard ;) |
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
Resolves #1008