Giter Club home page Giter Club logo

go-thousandeyes's Introduction

GoDoc Go Report Card License codecov Gitter

go-thousandeyes

go-thousandeyes is a go client library for the Thousandeyes v6 API. This repo also contains a supporting CLI tool tectl that uses the client lib.

Installation

First, download the source code

go get github.com/william20111/go-thousandeyes

Usage

Using tectl

tectl get agents           
AGENT NAME                              AGENTID ENABLED LOCATION                        IPADDRESSES                                                                                                                                                                                                     
Dallas, TX (Trial)                      4492    0       Dallas Area                     104.130.154.136,104.130.156.108,104.130.141.203,104.130.155.161                                                                                                                                                        
Chicago, IL (Trial)                     4495    0       Chicago Area                    23.253.167.114,23.253.41.151,23.253.46.129,23.253.47.96                                                                                                                                                                
Ashburn, VA (Trial)                     4497    0       Ashburn Area                    23.253.149.202,162.242.253.124,23.253.149.138,162.242.252.22                                                                                                                                                           
Sydney, Australia (Trial)               4500    0       New South Wales, Australia      119.9.24.178,119.9.24.218,119.9.24.167,119.9.24.176,2401:1801:7801:101:ec6e:d653:b713:68cb 

Using client library

package main

import (
	"fmt"
	"github.com/william20111/go-thousandeyes"
)

func main() {
	client := thousandeyes.NewClient("foobar")
	agents, err := client.GetAgents()
	if err != nil {
		panic(err)
	}
	for _, a := range *agents {
		fmt.Println(a.AgentName)
	}
}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

Apache 2

Mentions

This is my first golang library and i have heavily leaned on go-pagerduty library for inspiration. Its a library I use and I have implemented a similar client interface based on their HttpClient wrapper. So thanks for the great oss lib!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.