Skip to content

Commit

Permalink
spanconfigstore: pull out the span config storage into internal struct
Browse files Browse the repository at this point in the history
This commit pulls out what used to be the spanconfig.Store logic into
as separate spanconfigstore.spanConfigStore struct to exclusively track
span <-> config pairs. This also makes room for adding another internal
struct to track system span configs in a future patch.

Release note: None
  • Loading branch information
arulajmani committed Feb 9, 2022
1 parent d988d3b commit 2d82497
Show file tree
Hide file tree
Showing 5 changed files with 684 additions and 551 deletions.
10 changes: 8 additions & 2 deletions pkg/spanconfig/spanconfigstore/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
name = "spanconfigstore",
srcs = ["store.go"],
srcs = [
"spanconfigstore.go",
"store.go",
],
importpath = "github.com/cockroachdb/cockroach/pkg/spanconfig/spanconfigstore",
visibility = ["//visibility:public"],
deps = [
Expand All @@ -20,7 +23,10 @@ go_library(

go_test(
name = "spanconfigstore_test",
srcs = ["store_test.go"],
srcs = [
"spanconfigstore_test.go",
"store_test.go",
],
data = glob(["testdata/**"]),
embed = [":spanconfigstore"],
deps = [
Expand Down
Loading

0 comments on commit 2d82497

Please sign in to comment.