-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Store.Flush() guarantee immediate flush on sinks with that suppo…
…rt (#40) * Make Store.Flush() guarantee immediate flush on sinks with that support Signed-off-by: James Sedgwick <[email protected]> * blockflush Signed-off-by: James Sedgwick <[email protected]> * jsedgwick_is_dumb Signed-off-by: James Sedgwick <[email protected]> * flush all bufs Signed-off-by: James Sedgwick <[email protected]>
- Loading branch information
James Sedgwick
authored
Aug 7, 2018
1 parent
1d8f034
commit f60c0ca
Showing
4 changed files
with
68 additions
and
17 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
package stats | ||
|
||
// A Sink is used by a Store to flush its data. | ||
// These functions may buffer the given data. | ||
type Sink interface { | ||
FlushCounter(name string, value uint64) | ||
FlushGauge(name string, value uint64) | ||
FlushTimer(name string, value float64) | ||
} | ||
|
||
// FlushableSink is an extension of Sink that provides a Flush() function that | ||
// will flush any buffered stats to the underlying store. | ||
type FlushableSink interface { | ||
Sink | ||
Flush() | ||
} |
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