-
Notifications
You must be signed in to change notification settings - Fork 55
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
Improve usage examples #95
Comments
@dzvancuks thx for suggestion,
in case of existing README, it has good basic info how you can setup all parts (with required imports) usage is quite good covered in tests, there you can see for every resource, how to create/update/read etc.... copying tests to specific main.go examples would not suffice (we would be just duplicating or even worse simplify solutions), you still need specific configuration and HAProxy paths and both, especially configuration is specific to each user. that would not bring much more that just examining test cases |
@oktalz My intentions were to do following scenario:
I've managed to create socket, connect to it via Having examples would be beneficial to see what client is capable of and how to do all of that. |
@dzvancuks +1 to your thought, in isolation, it is difficult to understand how to use this package. However, it is also nice that this another project uses it extensively, so it really helps going through that source code. |
yes, sry, in general you have two parts, configuration one and runtime one, and they are complexly independent. so runtime and actual state written in configuration file is handled separately. list of all things you can do through runtime is available through here: client-native/runtime/interface.go Line 139 in 31a9d2d
since its interface based (that might change in future) we could autogenerate documentation, but that imho would not bring much to the table, all functions are commented (mostly), or have meaningful names with params that are self explanatory what is missing though is, as it was said here, is maybe just an explanation how one side impact (or not) other, so a bit of a explanation why we have configuration part and runtime part (and why are they different) client native does not have many tests/examples to use with runtime, most of the testing and examples we have done in dataplaneapi project that uses it (+ kubernetes ingress controller one). I'll add a label to this. |
Please improve usage examples. Current Readme is hard to understand.
A good usage examples would be small application snippets with all imports and results are visible. I.e. see
https://github.com/nats-io/go-nats-examples/tree/main/api-examples
https://github.com/gnet-io/gnet-examples
The text was updated successfully, but these errors were encountered: