mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 14:51:44 +00:00
* Adding Token counting support for bring your own key customers using Redis cache * Adding Completions stuff * Adding Completions stuff * Adding Completions stuff * Adding Completions stuff * Fixing tokenizer * remvoing redundant comment * Adding Constants * Adding Constants * Fixing naming * Fixing naming * Fixing naming and exposure of tokenizer methods * Fixing naming and exposure of tokenizer methods * Fixing naming and exposure of tokenizer methods * Fixing naming and exposure of tokenizer methods * Adding StoreTokenUsage method right before resetting redis * Adding StoreTokenUsage method right before resetting redis * Adding StoreTokenUsage method right before resetting redis * Update internal/rcache/rcache.go Co-authored-by: Stephen Gutekanst <stephen@sourcegraph.com> * Update internal/rcache/rcache.go Co-authored-by: Stephen Gutekanst <stephen@sourcegraph.com> * Update cmd/frontend/internal/bg/store_token_usage_in_postgres.go Co-authored-by: Stephen Gutekanst <stephen@sourcegraph.com> * Adding StoreTokenUsage method right before resetting redis --------- Co-authored-by: Stephen Gutekanst <stephen@sourcegraph.com>
60 lines
1.6 KiB
Python
60 lines
1.6 KiB
Python
load("//dev:go_defs.bzl", "go_test")
|
|
load("@io_bazel_rules_go//go:def.bzl", "go_library")
|
|
|
|
go_library(
|
|
name = "updatecheck",
|
|
srcs = [
|
|
"build.go",
|
|
"client.go",
|
|
"doc.go",
|
|
"handler.go",
|
|
],
|
|
importpath = "github.com/sourcegraph/sourcegraph/internal/updatecheck",
|
|
visibility = ["//:__subpackages__"],
|
|
deps = [
|
|
"//cmd/frontend/hubspot",
|
|
"//cmd/frontend/hubspot/hubspotutil",
|
|
"//internal/completions/tokenusage",
|
|
"//internal/conf",
|
|
"//internal/conf/deploy",
|
|
"//internal/database",
|
|
"//internal/dotcom",
|
|
"//internal/env",
|
|
"//internal/extsvc/versions",
|
|
"//internal/httpcli",
|
|
"//internal/lazyregexp",
|
|
"//internal/metrics",
|
|
"//internal/pubsub",
|
|
"//internal/redispool",
|
|
"//internal/siteid",
|
|
"//internal/telemetry",
|
|
"//internal/telemetry/telemetryrecorder",
|
|
"//internal/types",
|
|
"//internal/usagestats",
|
|
"//internal/version",
|
|
"//lib/errors",
|
|
"@com_github_coreos_go_semver//semver",
|
|
"@com_github_gomodule_redigo//redis",
|
|
"@com_github_prometheus_client_golang//prometheus",
|
|
"@com_github_sourcegraph_log//:log",
|
|
"@io_opentelemetry_go_otel_metric//:metric",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "updatecheck_test",
|
|
timeout = "short",
|
|
srcs = [
|
|
"client_test.go",
|
|
"handler_test.go",
|
|
],
|
|
embed = [":updatecheck"],
|
|
deps = [
|
|
"//internal/extsvc",
|
|
"//internal/types",
|
|
"//lib/pointers",
|
|
"@com_github_google_go_cmp//cmp",
|
|
"@com_github_sourcegraph_log//logtest",
|
|
],
|
|
)
|