Merge pull request #4916 from stefanberger/streamproc_env_vars
Allow passing environent variables to StreamProcessors
This commit is contained in:
@@ -80,6 +80,8 @@ type StreamProcessor struct {
|
||||
Path string `toml:"path"`
|
||||
// Args to the binary
|
||||
Args []string `toml:"args"`
|
||||
// Environment variables for the binary
|
||||
Env []string `toml:"env"`
|
||||
}
|
||||
|
||||
// GetVersion returns the config file's version
|
||||
|
||||
@@ -91,7 +91,7 @@ func New(ctx context.Context, config *srvconfig.Config) (*Server, error) {
|
||||
return nil, err
|
||||
}
|
||||
for id, p := range config.StreamProcessors {
|
||||
diff.RegisterProcessor(diff.BinaryHandler(id, p.Returns, p.Accepts, p.Path, p.Args))
|
||||
diff.RegisterProcessor(diff.BinaryHandler(id, p.Returns, p.Accepts, p.Path, p.Args, p.Env))
|
||||
}
|
||||
|
||||
serverOpts := []grpc.ServerOption{
|
||||
|
||||
Reference in New Issue
Block a user