| Jan Schär | 4a18022 | 2024-07-29 16:32:54 +0200 | [diff] [blame^] | 1 | load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") |
| 2 | |
| 3 | go_library( |
| 4 | name = "dns", |
| 5 | srcs = [ |
| 6 | "dns.go", |
| 7 | "metrics.go", |
| 8 | "name.go", |
| 9 | "testhelpers.go", |
| 10 | ], |
| 11 | importpath = "source.monogon.dev/osbase/net/dns", |
| 12 | visibility = ["//visibility:public"], |
| 13 | deps = [ |
| 14 | "//osbase/supervisor", |
| 15 | "@com_github_miekg_dns//:dns", |
| 16 | "@com_github_prometheus_client_golang//prometheus", |
| 17 | "@com_github_prometheus_client_golang//prometheus/promauto", |
| 18 | ], |
| 19 | ) |
| 20 | |
| 21 | exports_files([ |
| 22 | "resolv.conf", |
| 23 | "hosts", |
| 24 | ]) |
| 25 | |
| 26 | go_test( |
| 27 | name = "dns_test", |
| 28 | srcs = [ |
| 29 | "dns_test.go", |
| 30 | "name_test.go", |
| 31 | ], |
| 32 | embed = [":dns"], |
| 33 | deps = [ |
| 34 | "//osbase/net/dns/test", |
| 35 | "@com_github_miekg_dns//:dns", |
| 36 | ], |
| 37 | ) |