Skip to content

Conversation

@dims
Copy link
Member

@dims dims commented Dec 17, 2025

Introduces TypedRingFixed[T], a generic circular buffer with fixed capacity. When full, new writes overwrite the oldest entries, retaining only the most recent N elements. Useful for capturing the tail of command output or log streams where memory must remain bounded.

We need this to replace https://github.com/armon/circbuf used in k/k repo.

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Release note:

Add support for a fixed-size circular byte buffer

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 17, 2025
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 17, 2025
@dims
Copy link
Member Author

dims commented Dec 17, 2025

/assign @liggitt

@dims dims force-pushed the add-ring-fixed branch 3 times, most recently from 6adfe88 to 57c85b6 Compare December 18, 2025 16:23
Introduces TypedRingFixed[T], a generic circular buffer with fixed capacity.
When full, new writes overwrite the oldest entries, retaining only the most
recent N elements. Useful for capturing the tail of command output or log
streams where memory must remain bounded.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@dims dims changed the title Add fixed-size circular byte buffer Add fixed-size circular buffer with io.Writer support Dec 18, 2025
@skitt
Copy link
Member

skitt commented Dec 19, 2025

/lgtm

Thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, skitt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 19, 2025
@k8s-ci-robot k8s-ci-robot merged commit 98d557b into kubernetes:master Dec 19, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants