|Steven Jacobs d7732932ad add best practices snippet for inspiration||1 year ago|
|saltstack||1 year ago|
|Jenkinsfile||1 year ago|
|README.md||1 year ago|
|docker-compose.yml||1 year ago|
|go.mod||1 year ago|
|queryfile||1 year ago|
Golang SaltStack API Bindings
Currently only supports SaltStack CherryPy netapi module.
go test ./...
There is a
docker-compose.yml for a quick, easy, and insecure Salt Master and API listening on https://localhost:8000/.
queryfile for quick query experimentation and reference with pashky/restclient.el.
Given the performance overhead and HTTP timeouts for long-running operations described above, the most effective and most scalable way to use both Salt and salt-api is to run commands asynchronously using the
Running asynchronous jobs results in being able to process 3x more commands per second for
LocalClientand 17x more commands per second for
RunnerClient, in addition to much less network traffic and memory requirements. Job returns can be fetched from Salt's job cache via the
/jobs/<jid>endpoint, or they can be collected into a data store using Salt's Returner system.
/eventsendpoint is specifically designed to handle long-running HTTP connections and it exposes Salt's event bus which includes job returns. Watching this endpoint first, then executing asynchronous Salt commands second, is the most lightweight and scalable way to use
rest_cherrypywhile still receiving job returns in real-time. But this requires clients that can properly handle the inherent asynchronicity of that workflow.