-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Allow a keystore to be send with functionbeat files #10263
Conversation
|
||
content, err := bundle.Bytes() | ||
if err != nil { | ||
return nil, err | ||
} | ||
return content, nil | ||
} | ||
|
||
func keystoreRaw() ([]byte, error) { |
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.
I've wanted to decouple the starting from the reading the keystore otherwise it would require a lot of jumps to receive that information.
The more I think about it, we might need one a single global with current beat information.
defaultPathConfig, _ := cfg.String("path.config", -1) | ||
defaultPathConfig = filepath.Join(defaultPathConfig, fmt.Sprintf("%s.keystore", b.Info.Beat)) | ||
store, err := keystore.Factory(keystoreCfg, defaultPathConfig) | ||
store, err := LoadKeystore(cfg, b.Info.Beat) |
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.
You are returning the same error message from LoadKeystore
and from configuration
function if LoadKeystore
fails. Please either provide different messages or remove one.
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.
good catch.
@kvch I am wrapping the error message in the |
I still see the duplicate error message |
287bf6c
to
d022fb2
Compare
🤦♂️ I've just modified the |
@kvch Can I get the approve on this? |
Add a new interface in the keystore package named Packager, this allow a keystore to return the raw bytes of the keys and values store in it. This is used with core.MakeZip() to create the package that will be send to the lambda function. Fixes: elastic#9009
57b16f1
to
c9b9cef
Compare
@urso I have fixed the issue on my side and rebased this PR. |
* Allow a keystore to be send with functionbeat files Add a new interface in the keystore package named Packager, this allow a keystore to return the raw bytes of the keys and values store in it. This is used with core.MakeZip() to create the package that will be send to the lambda function. Fixes: elastic#9009 (cherry picked from commit db8a647)
* Allow a keystore to be send with functionbeat files Add a new interface in the keystore package named Packager, this allow a keystore to return the raw bytes of the keys and values store in it. This is used with core.MakeZip() to create the package that will be send to the lambda function. Fixes: #9009 (cherry picked from commit db8a647)
Add a new interface in the keystore package named Packager, this allow a
keystore to return the raw bytes of the keys and values store in it.
This is used with core.MakeZip() to create the package that will be send
to the lambda function.
Fixes: #9009