8000 GitHub - ravan/stackstate-client: Client library for StackState
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ravan/stackstate-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Client library for StackState

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0