-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Introduce plugin storage #864
Conversation
@repeatedly Could you review this? |
@sonots Could you review this first? I'm now busy so I don't have enough time to review large patch... |
7335c13
to
4e7170f
Compare
Comments
|
@sonots File is not good abstraction, because S3 (and many other file systems) has files. |
|
LocalStorage sounds good for me because it expresses it would store into local memory or local file, but not S3. At least, it should be better than
Okay, I think it is fine because I guess most of users not care of the format (unless they deeply care of performance)
Okay, thanks. |
586dcad
to
49d68b2
Compare
I changed default storage name from "json" to "local". |
LGTM! |
data = Yajl::Parser.parse(open(@path, 'r:utf-8'){ |io| io.read }) | ||
raise Fluent::ConfigError, "Invalid contents (not object) in plugin storage file: '#{@path}'" unless data.is_a?(Hash) | ||
rescue => e | ||
log.error "Failed to read data fron plugin storage file", path: @path, error_class: e.class, error: e |
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.
typo: fron
49d68b2
to
4d29491
Compare
I pushed fixes for comments. |
LTGM |
Okay. |
This patch is to add a new feature "plugin storages" to store key-value data to pluggable storages.
It is useful for many purposes:
This feature requires many more additions not included in this change for actual use cases (will be added in following changes):