-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added interactive tutorial [kubeCon] (#1255)
Signed-off-by: bwplotka <bwplotka@gmail.com>
- Loading branch information
Showing
12 changed files
with
1,378 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
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,2 @@ | ||
internal/e2e_* | ||
whatsup.yaml |
Binary file not shown.
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,29 @@ | ||
|
||
.PHONY: help | ||
help: ## Displays help. | ||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-z0-9A-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) | ||
|
||
.PHONY: init | ||
init: ## init | ||
$(MAKE) stop | ||
go test -count 1 -v -tags=interactive -run ^TestPlayground ./internal & # count 1 is to avoid cache. | ||
|
||
.PHONY: stop | ||
stop: ## stop init | ||
@curl -s http://localhost:19920 || true | ||
|
||
.PHONY: run | ||
run: ## run whatsup | ||
@go run main.go -config-file=./whatsup.yaml -address=:99 | ||
|
||
.PHONY: metrics | ||
metrics: ## get metrics from whatsup | ||
@curl -H 'Accept: application/openmetrics-text' localhost:99/metrics | ||
|
||
.PHONY: whatsup | ||
whatsup: ## ask what's up | ||
@curl localhost:99/whatsup | ||
|
||
.PHONY: test | ||
test: ## run acceptance tests | ||
go test -count 1 -v -tags=interactive -run ^TestAcceptance ./internal & # count 1 is to avoid cache. |
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 @@ | ||
# client_golang Tutorial: "WhatsUp" | ||
|
||
See [slides](./ContribFest.pdf) |
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,55 @@ | ||
module github.com/prometheus/client_golang/tutorial | ||
|
||
go 1.20 | ||
|
||
require ( | ||
github.com/bwplotka/tracing-go v0.0.0-20230421061608-abdf862ceccd | ||
github.com/efficientgo/core v1.0.0-rc.2 | ||
github.com/efficientgo/e2e v0.14.1-0.20230421070206-d72d43f3b937 | ||
github.com/oklog/run v1.1.0 | ||
github.com/prometheus/client_golang v1.15.1-0.20230416215738-0963f595c689 | ||
github.com/prometheus/common v0.42.0 | ||
gopkg.in/yaml.v2 v2.4.0 | ||
) | ||
|
||
require ( | ||
github.com/beorn7/perks v1.0.1 // indirect | ||
github.com/cenkalti/backoff/v4 v4.1.2 // indirect | ||
github.com/cespare/xxhash/v2 v2.2.0 // indirect | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/efficientgo/tools/core v0.0.0-20220225185207-fe763185946b // indirect | ||
github.com/felixge/httpsnoop v1.0.2 // indirect | ||
github.com/go-logr/logr v1.2.3 // indirect | ||
github.com/go-logr/stdr v1.2.2 // indirect | ||
github.com/golang/protobuf v1.5.3 // indirect | ||
github.com/google/go-cmp v0.5.9 // indirect | ||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect | ||
github.com/jpillora/backoff v1.0.0 // indirect | ||
github.com/json-iterator/go v1.1.12 // indirect | ||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect | ||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect | ||
github.com/modern-go/reflect2 v1.0.2 // indirect | ||
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/prometheus/client_model v0.3.0 // indirect | ||
github.com/prometheus/procfs v0.9.0 // indirect | ||
github.com/rogpeppe/go-internal v1.10.0 // indirect | ||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect | ||
go.opentelemetry.io/otel v1.7.0 // indirect | ||
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.6.3 // indirect | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.6.3 // indirect | ||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.6.3 // indirect | ||
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.6.3 // indirect | ||
go.opentelemetry.io/otel/metric v0.30.0 // indirect | ||
go.opentelemetry.io/otel/sdk v1.6.3 // indirect | ||
go.opentelemetry.io/otel/trace v1.7.0 // indirect | ||
go.opentelemetry.io/proto/otlp v0.15.0 // indirect | ||
golang.org/x/net v0.7.0 // indirect | ||
golang.org/x/oauth2 v0.5.0 // indirect | ||
golang.org/x/sys v0.6.0 // indirect | ||
golang.org/x/text v0.7.0 // indirect | ||
google.golang.org/appengine v1.6.7 // indirect | ||
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1 // indirect | ||
google.golang.org/grpc v1.45.0 // indirect | ||
google.golang.org/protobuf v1.30.0 // indirect | ||
) |
Oops, something went wrong.