Skip to content

whitepages/go-stingray

Repository files navigation

go-stingray

GoDoc Build Status

go-stingray is a client library for accessing the Stingray Traffic Manager REST API.

For documentation of the Stingray API, see the "Stingray Traffic Manager REST API Guide" version 2.6, March 2014 from the Riverbed support site.

Usage

import "github.com/whitepages/go-stingray"

Create a new Stingray client.

client := stingray.NewClient(nil, "https://localhost:9070", "username", "password")

Manage an extra file.

fmt.Println("Writing...")
r := stingray.NewExtraFile("name")
r.Content = []byte("Test")
resp, err := client.Set(r)
fmt.Println("Status:", resp.Status)
if err != nil {
	log.Fatal(err)
}

fmt.Println("Reading...")
r, resp, err = client.GetExtraFile("name")
if err != nil {
	log.Fatal(err)
}
fmt.Println("Status:", resp.Status)
fmt.Println("Content:", string(r.Content))

fmt.Println("Deleting...")
r = stingray.NewExtraFile("name")
resp, err = client.Delete(r)
if err != nil {
	log.Fatal(err)
}
fmt.Println("Status:", resp.Status)
Writing...
Status: 201 Created
Reading...
Status: 200 OK
Content: Test
Deleting...
Status: 204 No Content

Supported Resources

Support for resources is being added as needed.

  • Action Program
  • Alerting Action
  • Aptimizer Application Scope
  • Aptimizer Profile
  • Bandwidth Class
  • Cloud Credentials
  • Custom configuration set
  • Event Type
  • Extra File
  • GLB Service
  • Global Settings
  • License
  • Location
  • Monitor
  • Monitor Program
  • NAT Configuration
  • Pool
  • Protection Class
  • Rate Shaping Class
  • Rule
  • SLM Class
  • SSL Client Key Pair
  • SSL Key Pair
  • SSL Trusted Certificate
  • Security Settings
  • Session Persistence Class
  • Traffic IP Group
  • Traffic Manager (incomplete)
  • TrafficScript Authenticator
  • User Authenticator
  • User Group
  • Virtual Server

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages