Use regex with aliasSub to grab whole ( (.*) ) metric and change it - add desired text ( \1 last week ). E.g.
aliasByNode(timeShift(my.application.metric.$Continent.$DC.*, "7d"), 4, 5, 3)
should look like
| package auth | |
| import ( | |
| "net/http" | |
| "net/url" | |
| "strings" | |
| "time" | |
| "colobu.com/tr/common/data" | |
| "colobu.com/tr/common/db" |
| https://docs.docker.com/develop/sdk/examples/ |
| // First: go get github.com/golang/glog | |
| // Then : go test -v -vmodule=*=3 -logtostderr netgrace_test.go | |
| // This test package shows how to gracefully shutdown a net.Listener. | |
| package netgrace | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "github.com/golang/glog" |
| # See docs/examples | |
| # http://doc.gitlab.com/ce/ci/quick_start/README.html | |
| # http://doc.gitlab.com/ce/ci/yaml/README.html | |
| # GitLab CI template for Go tests. Note this installs | |
| # a new working copy of Go in a non-standard path such | |
| # that sudo/root is not needed for the install stage. | |
| # note that this particular install-environment stage | |
| # is overly verbose in order to debug anything tricky |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "syscall" | |
| "unsafe" | |
| ) | |
| var ( |
| // Simple groupcache example: https://github.com/golang/groupcache | |
| // Running 3 instances: | |
| // go run groupcache.go -addr=:8080 -pool=http://127.0.0.1:8080,http://127.0.0.1:8081,http://127.0.0.1:8082 | |
| // go run groupcache.go -addr=:8081 -pool=http://127.0.0.1:8081,http://127.0.0.1:8080,http://127.0.0.1:8082 | |
| // go run groupcache.go -addr=:8082 -pool=http://127.0.0.1:8082,http://127.0.0.1:8080,http://127.0.0.1:8081 | |
| // Testing: | |
| // curl localhost:8080/color?name=red | |
| package main | |
| import ( |
Edit: This list is now maintained in the rust-anthology repo.
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| func Decorate(impl interface{}) interface{} { | |
| fn := reflect.ValueOf(impl) |