Skip to content

Commit

Permalink
Update sensu handler to use sensu plugin library (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
satterly committed Sep 19, 2019
1 parent f830f1a commit 8b5e1f7
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 476 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ vendor/
# deploy
bonsai/
dist/

sensu-alerta-handler
20 changes: 11 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
language: go
go:
- 1.10.x
- 1.11.x

install:
- go get gopkg.in/alecthomas/gometalinter.v1
- go get github.com/gordonklaus/ineffassign
- go get github.com/jgautheron/goconst/cmd/goconst
- go get github.com/kisielk/errcheck
- go get github.com/golang/dep/cmd/dep
- dep ensure
- go get github.com/sensu/sensu-go/api/core/v2
- go get github.com/sensu/sensu-plugins-go-library/sensu
- go get github.com/stretchr/testify/assert
- go get github.com/golangci/golangci-lint/cmd/golangci-lint

env:
- GO111MODULE=on

script:
- gometalinter.v1 --vendor --disable-all --enable=vet --enable=ineffassign
--enable=goconst --tests ./...
- golangci-lint run --disable-all --enable=vet --enable=ineffassign --enable=goconst --tests ./...
- go test -v -race ./...

before_script:
Expand Down
272 changes: 0 additions & 272 deletions Gopkg.lock

This file was deleted.

42 changes: 0 additions & 42 deletions Gopkg.toml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ Usage:
sensu-alerta-handler [flags]
Flags:
-K, --api-key string API key for authenticated access.
--endpoint-url string API endpoint URL.
-K, --api-key string API key for authenticated access
--endpoint-url string API endpoint URL (default "http://localhost:8080")
-E, --environment string Environment eg. Production, Development (default "Entity Namespace")
-h, --help help for sensu-alerta-handler
```

Expand Down
18 changes: 2 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,9 @@ module sensu-alerta-handler
go 1.12

require (
github.com/coreos/etcd v3.3.10+incompatible // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/echlebek/crock v1.0.1 // indirect
github.com/echlebek/timeproxy v1.0.0 // indirect
github.com/gogo/protobuf v1.1.1 // indirect
github.com/google/gofuzz v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v0.0.0-20171115153421-f7279a603ede // indirect
github.com/robertkrimen/otto v0.0.0-20180617131154-15f95af6e78d // indirect
github.com/robfig/cron v0.0.0-20171101201047-2315d5715e36 // indirect
github.com/sensu/sensu-go v0.0.0-20181130214924-2daf9d442dee
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.3 // indirect
github.com/sensu/sensu-go v0.0.0-20190508172758-32aea478ae74
github.com/sensu/sensu-plugins-go-library v0.0.0-20190807215741-0080e59982e6
github.com/stretchr/testify v1.3.0
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc // indirect
golang.org/x/sys v0.0.0-20181206074257-70b957f3b65e // indirect
google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898 // indirect
google.golang.org/grpc v1.17.0 // indirect
gopkg.in/sourcemap.v1 v1.0.5 // indirect
)
Loading

0 comments on commit 8b5e1f7

Please sign in to comment.