repository
0.0.0-20241103155858-7bb40d9d2c78
Repository: https://github.com/ravan/stackstate-client.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
StackState Client Library
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.
Installation
go get github.com/ravan/stackstate-client
Usage
Access Rest API Endpoints
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()
Access Receiver API Endpoints
See StackState k8s extension integration for examples on using the receiver api.
Authorization
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.