| load("//bazel/go:go_test.bzl", "go_test") |
| load("@io_bazel_rules_go//go:def.bzl", "go_library") |
| |
| go_library( |
| name = "metrics2", |
| srcs = [ |
| "counter.go", |
| "docs.go", |
| "liveness.go", |
| "metrics.go", |
| "metrics_helpers.go", |
| "prom.go", |
| "timer.go", |
| ], |
| importpath = "go.skia.org/infra/go/metrics2", |
| visibility = ["//visibility:public"], |
| deps = [ |
| "//go/skerr", |
| "//go/sklog", |
| "//go/util", |
| "@com_github_gorilla_mux//:mux", |
| "@com_github_prometheus_client_golang//prometheus", |
| "@com_github_prometheus_client_golang//prometheus/promhttp", |
| ], |
| ) |
| |
| go_test( |
| name = "metrics2_test", |
| srcs = ["prom_test.go"], |
| embed = [":metrics2"], |
| deps = [ |
| "//go/metrics2/testutils", |
| "//go/testutils/unittest", |
| "@com_github_prometheus_client_golang//prometheus", |
| "@com_github_stretchr_testify//require", |
| ], |
| ) |