-
Notifications
You must be signed in to change notification settings - Fork 38
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
Configuration management and multi-service support #874
base: master
Are you sure you want to change the base?
Conversation
Set(string) error | ||
} | ||
|
||
func MultiOptionDecoder(f reflect.Type, t reflect.Type, data interface{}) (interface{}, 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.
exported function MultiOptionDecoder should have comment or be unexported
@@ -30,6 +38,80 @@ func loggingMiddleware(next http.Handler) http.Handler { | |||
}) | |||
} | |||
|
|||
type FlagSetter interface { |
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.
exported type FlagSetter should have comment or be unexported
Set(string) error | ||
} | ||
|
||
func MultiOptionDecoder(f reflect.Type, t reflect.Type, data interface{}) (interface{}, 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.
exported function MultiOptionDecoder should have comment or be unexported
@@ -30,6 +38,80 @@ func loggingMiddleware(next http.Handler) http.Handler { | |||
}) | |||
} | |||
|
|||
type FlagSetter interface { |
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.
exported type FlagSetter should have comment or be unexported
Set(string) error | ||
} | ||
|
||
func MultiOptionDecoder(f reflect.Type, t reflect.Type, data interface{}) (interface{}, 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.
exported function MultiOptionDecoder should have comment or be unexported
@@ -30,6 +38,80 @@ func loggingMiddleware(next http.Handler) http.Handler { | |||
}) | |||
} | |||
|
|||
type FlagSetter interface { |
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.
exported type FlagSetter should have comment or be unexported
|
||
ModifierConfig HTTPModifierConfig | ||
type AppSettings struct { |
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.
exported type AppSettings should have comment or be unexported
@urbanishimwe any ideas why this test fails? |
Now you can use config file and env variables to configure GoReplay WIP
4d4677b
to
d693032
Compare
i try to merge config-management to master, but found some problem config settings then i run: the InputRaw Filed could not parse params correctly. it should be parse to :8000 but [:8000] how i could solve this problem ? |
i has fixed |
This is a great feature, why isn't it incorporated into the Master |
Now you can use the config file and env variables to configure GoReplay.
Additionally, you now can manage multiple services with a single instance.
Example usage with a config file:
goreplay.yaml (looks up in current dir, /etc/goreplay/ and `~/.goreplay/ folders)
Operations defined outside of the "services" section are global ones and applied to all services.
For example, you can have global input, but two different independent outputs, or vice versa.
Additionally, you can define global and per service modifiers and filters.
When you need to specify multiple values, just use YAML format. Both single and array values supported. Example:
Using environment variables
All env variables should start with
GR_
prefix.Should be way easier to use in CI/CD flows now. Example with env variables:
GR_SERVICE=foo GR_INPUT_RAW=:80 GR_OUTPUT_FILE=requests.gor goreplay
At the moment it is not possible to specify multiple services via ENV vars.