This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrating movingaverage plugin from Pulse repo.
- Loading branch information
1 parent
dd43195
commit 1052134
Showing
12 changed files
with
733 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Compiled Object files, Static and Dynamic libs (Shared Objects) | ||
*.o | ||
*.a | ||
*.so | ||
|
||
# Folders | ||
_obj | ||
_test | ||
|
||
# Architecture specific extensions/prefixes | ||
*.[568vq] | ||
[568vq].out | ||
|
||
*.cgo1.go | ||
*.cgo2.c | ||
_cgo_defun.c | ||
_cgo_gotypes.go | ||
_cgo_export.* | ||
|
||
_testmain.go | ||
|
||
*.exe | ||
*.test | ||
.idea | ||
tmp/ | ||
*.tmp | ||
scratch/ | ||
build/ | ||
*.swp | ||
profile.cov | ||
gin-bin | ||
|
||
# we don't vendor godep _workspace | ||
**/Godeps/_workspace/** | ||
|
||
# OSX stuff | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
machine github.com | ||
login intelsdibot | ||
password 0f60cedb3c004ae0a79c24e6b30ce416ab4fcc49 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
sudo: required | ||
services: | ||
- docker | ||
language: go | ||
go: | ||
- 1.4.2 | ||
- 1.5 | ||
before_install: | ||
- cp .netrc ~ | ||
- chmod 600 .netrc | ||
- go get github.com/tools/godep | ||
- if [ ! -d $PULSE_PLUGIN_SOURCE ]; then mkdir -p $HOME/gopath/src/github.com/intelsdi-x; ln -s $TRAVIS_BUILD_DIR $PULSE_PLUGIN_SOURCE; fi # CI for forks not from intelsdi-x | ||
env: | ||
global: | ||
- PULSE_PLUGIN_SOURCE=/home/travis/gopath/src/github.com/intelsdi-x/pulse-plugin-processor-movingaverage | ||
matrix: | ||
- TEST=unit | ||
install: | ||
- export TMPDIR=$HOME/tmp | ||
- mkdir -p $TMPDIR | ||
- cd $PULSE_PLUGIN_SOURCE # change dir into source | ||
- make deps | ||
script: | ||
- make check TEST=$TEST 2>&1 # Run test suite | ||
notifications: | ||
slack: | ||
secure: VkbZLIc2RH8yf3PtIAxUNPdAu3rQQ7yQx0GcK124JhbEnZGaHyK615V0rbG7HcVmYKGPdB0cXqZiLBDKGqGKb2zR1NepOe1nF03jxGSpPq8jIFeEXSJGEYGL34ScDzZZGuG6qwbjFcXiW5lqn6t8igzp7v2+URYBaZo5ktCS2xY= |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
default: | ||
$(MAKE) deps | ||
$(MAKE) all | ||
deps: | ||
bash -c "godep restore" | ||
test: | ||
bash -c "./scripts/test.sh $(TEST)" | ||
check: | ||
$(MAKE) test | ||
all: | ||
bash -c "./scripts/build.sh $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/intelsdi-x/pulse/control/plugin" | ||
"github.com/intelsdi-x/pulse/plugin/processor/pulse-processor-movingaverage/movingaverage" | ||
) | ||
|
||
func main() { | ||
meta := movingaverage.Meta() | ||
plugin.Start(meta, movingaverage.NewMovingaverageProcessor(), os.Args[1]) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// +build unit | ||
|
||
package main | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
. "github.com/smartystreets/goconvey/convey" | ||
) | ||
|
||
func TestMain(t *testing.T) { | ||
Convey("ensure plugin loads and responds", t, func() { | ||
os.Args = []string{"", "{\"NoDaemon\": true}"} | ||
So(func() { main() }, ShouldNotPanic) | ||
}) | ||
} |
Oops, something went wrong.