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
Add buffering wrapper around WriteSyncer #782
Closed
+259
−2
Closed
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
5f22c26
add buffer sync
sysulq 36d1a4f
support config bufferSize and flushInterval, improve logic
sysulq 9f7be81
improve
sysulq c1f54ca
update comment
sysulq 93832bc
WriterSyncer support Close method
sysulq ba42206
improve
sysulq 069d7b9
fix spell
sysulq 60350a2
improve cancel logic
sysulq 1c24017
improve
sysulq 6ab72db
remove close
sysulq bfd7a94
rename cancel to close and keep syncing
sysulq 66b7878
fix lint
sysulq 5e98dbb
100% test coverage
sysulq 5980ec9
improve comment
sysulq 7f5913c
improve comment
sysulq 07b0e3a
fix test error
sysulq dfdb0c2
fix race condition in test case
sysulq c8b9979
100% test coverage
sysulq 6d9018f
add loop and fix typo
sysulq f61fe13
Update zapcore/write_syncer.go
sysulq 7954bcf
improve test
sysulq 6e6e6f6
validate loop logic in test case
sysulq 1e7da7f
group default config
sysulq c427af2
improve close logic
sysulq 1d00db7
Update zapcore/write_syncer.go
sysulq a17596e
Update zapcore/write_syncer_test.go
sysulq ccd3608
Update zapcore/write_syncer_test.go
sysulq 13cdf32
Update zapcore/write_syncer_test.go
sysulq a2a235b
Update zapcore/write_syncer_test.go
sysulq 0477c9d
Update zapcore/write_syncer_test.go
sysulq 16a2147
Update zapcore/write_syncer_test.go
sysulq 761c8e8
improve close logic and use goleak
sysulq a2123c9
Drop `type CloseFunc`
abhinav 1957050
doc: Rewrite Buffer documentation
abhinav 371117f
Prefix default{BufferSize, FlushInterval} with _
abhinav 22a2427
Buffer/close: return a bound method
abhinav c0f68a9
Buffer/close: Close the channel instead of posting
abhinav f57c09b
_default{BufferSize, FlushInterval}: docs
abhinav 70795cf
buffer: Move loop into a method
abhinav d61c899
buffer/close: stop the ticker
abhinav 20fc7a8
Update zapcore/write_syncer_test.go
sysulq 319e6fe
Update zapcore/write_syncer.go
sysulq d293796
improve code style
sysulq d439793
Merge branch 'master' of https://github.com/hnlq715/zap
sysulq 9613897
Update zapcore/write_syncer.go
sysulq 5160827
Update zapcore/write_syncer.go
sysulq 37a503b
add comment
sysulq bea2863
Update zapcore/write_syncer.go
sysulq c971509
Update zapcore/write_syncer.go
sysulq 8c2cdfe
update
sysulq 1fe1117
Remove Lock/Unlock from tests
prashantv 0cd98f3
remove double buffer check
sysulq fe04d61
set timer to zero
sysulq 23ca47d
remove errorWriter
sysulq 2b0cf17
add SyncBuffer
sysulq File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
should we move this whole type and methods into a separate file?
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.
This file already contains Lock syncer and MultiWrite syncer, I think it is a proper place for Buffer syncer :-)