-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
zapcore: Add Buffered Writer #961
Commits on May 25, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c1e68d7 - Browse repository at this point
Copy the full SHA c1e68d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for df42521 - Browse repository at this point
Copy the full SHA df42521View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7f5e097 - Browse repository at this point
Copy the full SHA 7f5e097View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7eec047 - Browse repository at this point
Copy the full SHA 7eec047View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c8ec7b - Browse repository at this point
Copy the full SHA 3c8ec7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 046355f - Browse repository at this point
Copy the full SHA 046355fView commit details -
Configuration menu - View commit details
-
Copy full SHA for afe872f - Browse repository at this point
Copy the full SHA afe872fView commit details -
Configuration menu - View commit details
-
Copy full SHA for cce50b1 - Browse repository at this point
Copy the full SHA cce50b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef808a2 - Browse repository at this point
Copy the full SHA ef808a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3af046a - Browse repository at this point
Copy the full SHA 3af046aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e0a440d - Browse repository at this point
Copy the full SHA e0a440dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e571e25 - Browse repository at this point
Copy the full SHA e571e25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4a25c9f - Browse repository at this point
Copy the full SHA 4a25c9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 99f4ea8 - Browse repository at this point
Copy the full SHA 99f4ea8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 223dd97 - Browse repository at this point
Copy the full SHA 223dd97View commit details -
Configuration menu - View commit details
-
Copy full SHA for dd3698e - Browse repository at this point
Copy the full SHA dd3698eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f3079de - Browse repository at this point
Copy the full SHA f3079deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c09dc4 - Browse repository at this point
Copy the full SHA 2c09dc4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0f2a28 - Browse repository at this point
Copy the full SHA f0f2a28View commit details -
Update zapcore/write_syncer.go
Co-authored-by: Prashant Varanasi <github@prashantv.com>
Configuration menu - View commit details
-
Copy full SHA for fb6efc3 - Browse repository at this point
Copy the full SHA fb6efc3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0977e02 - Browse repository at this point
Copy the full SHA 0977e02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65775e1 - Browse repository at this point
Copy the full SHA 65775e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 470b7fa - Browse repository at this point
Copy the full SHA 470b7faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 160e84d - Browse repository at this point
Copy the full SHA 160e84dView commit details -
Update zapcore/write_syncer.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for ee04403 - Browse repository at this point
Copy the full SHA ee04403View commit details -
Update zapcore/write_syncer_test.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for 80433c2 - Browse repository at this point
Copy the full SHA 80433c2View commit details -
Update zapcore/write_syncer_test.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for 9bda819 - Browse repository at this point
Copy the full SHA 9bda819View commit details -
Update zapcore/write_syncer_test.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for dc370da - Browse repository at this point
Copy the full SHA dc370daView commit details -
Update zapcore/write_syncer_test.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for 2ecf1f8 - Browse repository at this point
Copy the full SHA 2ecf1f8View commit details -
Update zapcore/write_syncer_test.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for a522baf - Browse repository at this point
Copy the full SHA a522bafView commit details -
Update zapcore/write_syncer_test.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for 4273b8e - Browse repository at this point
Copy the full SHA 4273b8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d884534 - Browse repository at this point
Copy the full SHA d884534View commit details -
We'd like to avoid introducing a new top-level type if we can. Delete the CloseFunc type in favor of returning a naked `func() error`.
Configuration menu - View commit details
-
Copy full SHA for 0392f30 - Browse repository at this point
Copy the full SHA 0392f30View commit details -
Configuration menu - View commit details
-
Copy full SHA for ddace4d - Browse repository at this point
Copy the full SHA ddace4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e96c0ee - Browse repository at this point
Copy the full SHA e96c0eeView commit details -
Buffer/close: return a bound method
Instead of returning an anonmyous function, return a bound method. The bound method is named `close`, not `Close` to avoid accidentally exposing an `io.Closer` interface.
Configuration menu - View commit details
-
Copy full SHA for 570d2ff - Browse repository at this point
Copy the full SHA 570d2ffView commit details -
Buffer/close: Close the channel instead of posting
For the channel that signals end of the goroutine, we should close it instead of posting a single value to it.
Configuration menu - View commit details
-
Copy full SHA for d1e244a - Browse repository at this point
Copy the full SHA d1e244aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83f6331 - Browse repository at this point
Copy the full SHA 83f6331View commit details -
buffer: Move loop into a method
Move the flush loop into its own method instead of spawning it in a closure.
Configuration menu - View commit details
-
Copy full SHA for ba0b65e - Browse repository at this point
Copy the full SHA ba0b65eView commit details -
On close, stop the ticker from posting ticks to the channel.
Configuration menu - View commit details
-
Copy full SHA for b8a0b28 - Browse repository at this point
Copy the full SHA b8a0b28View commit details -
Update zapcore/write_syncer_test.go
Co-authored-by: Prashant Varanasi <github@prashantv.com>
Configuration menu - View commit details
-
Copy full SHA for 1c5daa9 - Browse repository at this point
Copy the full SHA 1c5daa9View commit details -
Configuration menu - View commit details
-
Copy full SHA for f74c558 - Browse repository at this point
Copy the full SHA f74c558View commit details -
Update zapcore/write_syncer.go
Co-authored-by: Prashant Varanasi <github@prashantv.com>
Configuration menu - View commit details
-
Copy full SHA for 6f88240 - Browse repository at this point
Copy the full SHA 6f88240View commit details -
Update zapcore/write_syncer.go
Co-authored-by: Prashant Varanasi <github@prashantv.com>
Configuration menu - View commit details
-
Copy full SHA for 963142b - Browse repository at this point
Copy the full SHA 963142bView commit details -
Update zapcore/write_syncer.go
Co-authored-by: Prashant Varanasi <github@prashantv.com>
Configuration menu - View commit details
-
Copy full SHA for f753926 - Browse repository at this point
Copy the full SHA f753926View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1db4692 - Browse repository at this point
Copy the full SHA 1db4692View commit details -
Update zapcore/write_syncer.go
Co-authored-by: Prashant Varanasi <github@prashantv.com>
Configuration menu - View commit details
-
Copy full SHA for 545d164 - Browse repository at this point
Copy the full SHA 545d164View commit details -
Update zapcore/write_syncer.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for c777047 - Browse repository at this point
Copy the full SHA c777047View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b0fcfd - Browse repository at this point
Copy the full SHA 1b0fcfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 02c9d3f - Browse repository at this point
Copy the full SHA 02c9d3fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4804188 - Browse repository at this point
Copy the full SHA 4804188View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ca46e9 - Browse repository at this point
Copy the full SHA 4ca46e9View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1a95ff - Browse repository at this point
Copy the full SHA b1a95ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6d58a7d - Browse repository at this point
Copy the full SHA 6d58a7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2312b39 - Browse repository at this point
Copy the full SHA 2312b39View commit details
Commits on Jun 1, 2021
-
Set default Clock zapcore/buffered_write_syncer.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for 7c32a14 - Browse repository at this point
Copy the full SHA 7c32a14View commit details -
Use require instead assert zapcore/buffered_write_syncer_bench_test.go
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for ffba68b - Browse repository at this point
Copy the full SHA ffba68bView commit details -
Update Close() comment, use filepath to create tmpDir and mutate Cloc…
…k on loadConfig if needed
Configuration menu - View commit details
-
Copy full SHA for a3fbb8e - Browse repository at this point
Copy the full SHA a3fbb8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 39f7316 - Browse repository at this point
Copy the full SHA 39f7316View commit details
Commits on Jun 4, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 10b45db - Browse repository at this point
Copy the full SHA 10b45dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0962b0f - Browse repository at this point
Copy the full SHA 0962b0fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7dedbc0 - Browse repository at this point
Copy the full SHA 7dedbc0View commit details
Commits on Jun 8, 2021
-
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for f8f3a3d - Browse repository at this point
Copy the full SHA f8f3a3dView commit details -
Use zapcore.Lock for BufferedWriteSyncer tests
Co-authored-by: Abhinav Gupta <mail@abhinavg.net>
Configuration menu - View commit details
-
Copy full SHA for acfd294 - Browse repository at this point
Copy the full SHA acfd294View commit details -
Add asserts on close/remove in benchmark buffered write and add test …
…case for wrap twice sync
Configuration menu - View commit details
-
Copy full SHA for f32b796 - Browse repository at this point
Copy the full SHA f32b796View commit details -
Configuration menu - View commit details
-
Copy full SHA for 17cdba5 - Browse repository at this point
Copy the full SHA 17cdba5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97ae2a6 - Browse repository at this point
Copy the full SHA 97ae2a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for b58819e - Browse repository at this point
Copy the full SHA b58819eView commit details -
Configuration menu - View commit details
-
Copy full SHA for afe558a - Browse repository at this point
Copy the full SHA afe558aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 49444fc - Browse repository at this point
Copy the full SHA 49444fcView commit details -
Stop/Sync: handle uninitialized calls
These methods should not panic if called without `Write` first (which is what starts the background goroutine).
Configuration menu - View commit details
-
Copy full SHA for 43d9b54 - Browse repository at this point
Copy the full SHA 43d9b54View commit details -
Rename WriteSyncer field to WS
Writing `BufferedWriteSyncer{WriteSyncer: ...}` is a mouthful. Let's go for something short and obvious like: ``` package io type LimitedReader struct { R Reader // underlying reader N int64 // max bytes remaining } ```
Configuration menu - View commit details
-
Copy full SHA for 7c7fb4d - Browse repository at this point
Copy the full SHA 7c7fb4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f30d68b - Browse repository at this point
Copy the full SHA f30d68bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac5b8ad - Browse repository at this point
Copy the full SHA ac5b8adView commit details