-
Notifications
You must be signed in to change notification settings - Fork 471
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
usage as a library #544
Comments
This is a reasonable request and to be honest, I am not a fan of using
This is confusing, could you go into more detail of your use case, please? My only worry is that @aelsabbahy will not prioritize this highly. Then you could work on this and I would love to help out. |
simply they are the other options the package today get from the CLI - I will give equivelant in code. |
Marking this as approved. It's very much an improvement to the current code. I probably won't dedicated personal time to this due to other issues being higher priority for me. That said, I will gladly review and merge changes that introduce this with testing. Honestly, the parts of the code that will benefit most from this refactor are the parts that would benefit most from having proper go based tests in place. |
In all seriousness, there's so much of the codebase that I've wanted to rewrite. My time has been limited and I end up favoring bug fixes and features to codequality improvements. I'm a huge fan of this ticket. |
I am also quite busy so my effort will be to get this done with as little as possible to reach my needs. Hopefully others can pick up where I left off. |
Work being done:
|
@ripienaar Is this done at this point? Also, what was your use-case, curious on where goss is being used as a library =) |
Yup done thanks. I make choria.io, my use case is to make a very large scale dgoss like thing and some other stuff Choria will have a new monitoring related distribution and could run goss checks regularly and handle distribution of the check definitions etc And things like adhic checks etc. It’s a orchestration system known to be deployed on fleets with 6 to 7 number node counts |
Awesome, thanks! I'll read up on choria, sounds like an interesting project =) |
It sends back the reports etc, summaries show that all 27 machines was sucesful, ran 5 tests had no failures. So 3 seconds is kind of slow - but these machines are in europe, us and uk. On a lan with fast networks 27 000 machines would take the same time :P |
Describe the feature:
I would like to be able to use goss as a package from within other go applications, there are various infra automation scenarios where its desirable to deliver the system as a single binary.
I'd like to do an integration into choria.io and some other things
Describe the solution you'd like
At least I would like to be able to do a validate, a few of the functions in validate.go, store.go, template.go and a few others do os.Exit() and require a number of unexported functions.
Would you be open to adjusting things a bit so a external package can use goss as a package for at least doing Validate?
Similar to #112
I'd roughly keep things are, even accepting a cli context in validate but I'd add a few helpers to let me do:
additional options for pkg type, output format and options, color, duration, retry duration and max concurrency
Describe alternatives you've considered
I tried to write this from the outside - alas, the os.Exit() etc is a pain
The text was updated successfully, but these errors were encountered: