-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
[feature] [option] adding a func as a option to randomize each request #236
Conversation
5ca02db
to
d75ae24
Compare
add some tests and todo and change signature
d75ae24
to
a7e59dd
Compare
Hello, thanks for the PR! The current package API really came more about historically as the CLI API was adapted to expose something that can be used programatically. I think in some ways there is room for improvement from package API perspective. I agree a more generalized functional API to provide data (and metadata) would be useful. It's something I've thought about for a while, and ideally really most of the other parameter options should just result in a functional "data provider", something as conceptualized here. So this is a good start I think! One comment I have is that perhaps it would be beneficial to expose
This would allow for clients to utilize the call data, as it may be helpful to have it:
Also just thinking some more, maybe the exposed struct name should be Thoughts on all of this? Thanks again for the PR, this looks like it should be beneficial! |
That sounds great and happy to hear that. Yes, both suggestions make sense. Let me add them 👍 I think that could potentially include a bigger documentation change as this means that I planned to make this only used for the go package, does this work for you? Or do you plan to have this as a CLI Option as well? 🤔 |
Hello, I am not sure what documentation changes you're referring to, it might be ambiguous. Sorry maybe I caused more confusion than necessary with some of my comments heh. All I was suggesting is:
dataFunc func(mtd *desc.MethodDescriptor, callData *runner.CallData) []byte Do not bother trying to document anything extra besides the godoc you already have. Also don't try to somehow expose this via CLI. I think these changes I propose here are reasonable and should be sufficient for the functionality you need? Maybe I misunderstood something. |
49e807e
to
3d23afa
Compare
I did both changes. Checks are passing. Ready for a review 👍 |
Thanks again for the PR! I made a few cleanups, mainly added |
This PR adds the ability to supply a
changeFunc
function for every request to ensure we can randomize data.Solves: #197
I am using this as an internal library, before adding more e.g. to the CLI as well as updating the documentation, I wanted to clarify whether this solution makes sense implementation wise and just have a discussion in general 👍