A Go wrapper for the SumoLogic API.
Any and all contributions are welcome. Please don't hestiate to submit an issue or pull request.
The initial release is focused on being consumed by a Terraform provider in AWS environments such as support for managing hosted collectors and AWS specific hosted sources (e.g. AWS Cloudtrail).
import "github.com/nextgenhealthcare/sumologic-sdk-go"
- auth_token: Base64 encoding of
<accessId>:<accessKey>
. For more information, see API Authentication - endpoint_url: Sumo Logic has several deployments that are assigned depending on the geographic location and the date an account is created. For more information, see Sumo Logic Endpoints and Firewall Security
client, _ := sumologic.NewClient("auth_token", "endpoint_url")
collector, _, err := client.GetHostedCollector(134485191)
if err == sumologic.ErrCollectorNotFound {
log.Fatalf("Collector not found: %s\n", err)
}
if err != nil {
log.Fatalf("Unknown error: %s\n", err)
}
log.Printf("Collector %d: %s\n", collector.Id, collector.Name)
Run unit tests with make test
.