thousandeyes-sdk-go
is a go client library for the Thousandeyes v6 API.
thousandeyes-sdk-go is compatible with modern Go releases in module mode, with Go installed:
go get github.com/thousandeyes/thousandeyes-sdk-go/v2
will resolve and add the package to the current development module, along with its dependencies.
Alternatively the same can be achieved if you use import in a package:
import "github.com/thousandeyes/thousandeyes-sdk-go/v2"
and run go get without parameters.
Example code to list ThousandEyes agents:
package main
import (
"fmt"
"os"
"github.com/thousandeyes/thousandeyes-sdk-go/v2"
)
func main() {
opts := thousandeyes.ClientOptions{
AuthToken: os.Getenv("TE_TOKEN"),
AccountID: os.Getenv("TE_AID"),
}
client := thousandeyes.NewClient(&opts)
agents, err := client.GetAgents()
if err != nil {
panic(err)
}
for _, a := range *agents {
fmt.Println(*a.AgentName)
}
}
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)This library is distributed under the Apache 2.0 license found in the LICENSE file.
This project is maintained by the ThousandEyes engineering team and accepts community contributions.
ThousandEyes would like to extend a thank you to William Fleming, John Dyer, and Joshua Blanchard for their contributions and community maintenance of this project.