-
Notifications
You must be signed in to change notification settings - Fork 131
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
Send payload to stdin #706
Conversation
plugins/run.go
Outdated
@@ -132,6 +132,12 @@ func runPlugin(plugin Plugin, args []string, pluginInput PluginInput) error { | |||
return err | |||
} | |||
|
|||
var payload []byte = nil |
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.
var payload []byte = nil | |
var payload []byte |
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.
plugins/run.go
Outdated
@@ -132,6 +132,12 @@ func runPlugin(plugin Plugin, args []string, pluginInput PluginInput) error { | |||
return err | |||
} | |||
|
|||
var payload []byte |
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.
instead, I suggest to modify the runPlugin
method -> func runPlugin(plugin Plugin, args []string, envs map[string]string, input []byte) error
.
current pluginInput
contains configuration for the plugin run -> env
input would be the data to be sent on the plugin command's stdin
it would make clear what input threated how, this change will need you to modify RunPluginByEvent
as well, to distinguish plugin configs (envs) and the payload (input).
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 am not sure if we should differentiate between envs and stdin here. We should discuss this
Send payload to stdin instead of providing it as an environmental variable to overcome the 20kB limit