Commit feb1d08
authored
Add common parameters of <storage> section (#639)
Fluent::Plugin::Storage defines four parameters common to every storage
plugin, but they were not documented anywhere.
lib/fluent/plugin/storage.rb:29-32
config_param :persistent, :bool, default: false # load/save with all operations
config_param :autosave, :bool, default: true
config_param :autosave_interval, :time, default: 10
config_param :save_at_shutdown, :bool, default: true
The described behaviour follows lib/fluent/plugin_helper/storage.rb:
* #wrap_instance (l.182-192) wraps the storage in PersistentWrapper when
`persistent` is true, which loads before and saves after each operation.
* #start (l.124-132) registers the autosave timer only when
`autosave && !persistent`.
* #shutdown (l.159-164) saves when `save_at_shutdown` is true, regardless
of the other three.
Signed-off-by: Shizuo Fujita <fujita@clear-code.com>1 parent c70a3e3 commit feb1d08
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
41 | 59 | | |
42 | 60 | | |
0 commit comments