GitShow/tj/go-buffer
tj

go-buffer

Generic buffer for batching entries, such as log events.

by tj
Star on GitHubFork

Go

67 stars3 forks1 contributorQuiet · 6y agoSince 2020MIT

Meet the team

See all 1 on GitHub →
tj
tj6 contributions

Languages

View on GitHub →
Go100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
57
✓README✓License○Contributing○Code of Conduct✓Issue Template✓PR Template

Recent PRs & issues

Quiet · 2 discussions · Last activity 6y ago
See all on GitHub →
maxwellhertz
Handle flush errors by putting values back in the bufferOpenIssue

Prerequisites [✔️] I searched to see if the issue already exists. Description I looked into the source code and found that values would be discarded if any error occurred during a flush. Shouldn't it put all the values back in the buffer if it can't flush them successfully?

maxwellhertz · 5y ago
audiolion
Calling Close multiple times results in a panicOpenIssue

Prerequisites [x] I searched to see if the issue already exists. Description https://github.com/tj/go-buffer/blob/3b6460d4b37b149c3a7d9081f0b39a05eee31a89/buffer.go#L164 the close method calls close on the channel, so if this is called multiple times, a panic will occur. When using apexlog's handler, it uses go-buffer under the hood when the handler calls it's Close method https://github.com/apex/log/blob/8da83152b5d6177b4bfe3d12810a5afd25355170/handlers/apexlogs/apexlogs.go#L108 and as a result, a panic will occur. Though you shouldn't need to call Close more than once, it certainly wasn't expected behavior for me when I hit a panic as a result of doing so.

audiolion · 5y ago
Structured data for AI agents

Repository: tj/go-buffer. Description: Generic buffer for batching entries, such as log events. Stars: 67, Forks: 3. Primary language: Go. Languages: Go (100%). License: MIT. Open PRs: 0, open issues: 2. Last activity: 6y ago. Community health: 57%. Top contributors: tj.

·@ofershap

Replace github.com with gitshow.dev