Enables communication with the StackState rest api and receiver api.
This library is evolving to support all StackState api calls. Please feel free to add new api calls as needed.
go get github.com/ravan/stackstate-client
import (
sts "github.com/ravan/stackstate-client/stackstate"
"github.com/ravan/stackstate-client/stackstate/api"
"github.com/ravan/stackstate-client/stackstate/receiver"
)
conf := &sts.StackState{
ApiUrl: os.Getenv("STS_URL"),
ApiKey: os.Getenv("STS_API_KEY"),
ApiToken: os.Getenv("STS_TOKEN"),
}
// To access the API rest endpoints
client := api.NewClient(conf)
status, err := client.Status()
See StackState k8s extension integration for examples on using the receiver api.
The TopologyQuery and TopologyStreamQuery methods require additional authorization on the StackState server.
You will get the error "The supplied authentication is not authorized to access this resource"
.
Speak to your StackState administrator for more information.