Request: Non Recursive "directory" listing
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- distributed-systems
Research direction
Start with the existing List(key) entry point and trace how the library's backends enumerate keys under a prefix. Resolve the API design between recursion or depth and child-type filtering, then define behavior for immediate children, keys, directories, and both before adding coverage.
Written by the indexing model from the issue text.
Description
While .List(key) is useful if I want everything under the directory/root passed to it, there are some aspects of an ls type action which are very useful but missing:
- Non-Recursive Listing or depth specification
- What type of children to return
For the first I want to be able to get just the immediate children. For the second I want to be able to get back "directories", "keys", or both. For example something like:
kv.List("foo/bar/","directory",false)
...where false is a flag for recursion, and the return is a list of sub directories in "foo/bar". Alternatively making the second argument "keys" would only return keys, and "any" would return both. Passing true for the third argument would indicate I want all of whatever type under that prefix.
Alternatively we could instead of 'recurse boolwe could use adepthparameter wheredepth=0means no recursion, anddepth=5` means you wild get listing for up to 5 levels down from the given prefix.
Obviously the example would break the existing API so I'd be open to another name such as ListFilter or something ti identify it is a bit stronger than a basic List call
- Dominant language
- Go
- Stars
- 847
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker/libkv
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100