-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allocatorimpl: carve out an allocator package
Do the same for kvserver/replicastats, a type that's used as an input for the allocator at various points (needed to break the dependency between the allocatorimpl and kvserver). We take the same approach as the last commit, exporting anything and everything needed to introduce a hard package boundary. Release note: None
- Loading branch information
1 parent
a582830
commit 4f96b1b
Showing
45 changed files
with
1,823 additions
and
1,562 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
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
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,71 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") | ||
|
||
go_library( | ||
name = "allocatorimpl", | ||
srcs = [ | ||
"allocator.go", | ||
"allocator_scorer.go", | ||
"test_helpers.go", | ||
], | ||
importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/allocator/allocatorimpl", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//pkg/clusterversion", | ||
"//pkg/gossip", | ||
"//pkg/kv/kvserver/allocator", | ||
"//pkg/kv/kvserver/allocator/storepool", | ||
"//pkg/kv/kvserver/constraint", | ||
"//pkg/kv/kvserver/liveness/livenesspb", | ||
"//pkg/kv/kvserver/replicastats", | ||
"//pkg/roachpb", | ||
"//pkg/settings", | ||
"//pkg/settings/cluster", | ||
"//pkg/util/hlc", | ||
"//pkg/util/log", | ||
"//pkg/util/metric", | ||
"//pkg/util/stop", | ||
"//pkg/util/syncutil", | ||
"@com_github_cockroachdb_errors//:errors", | ||
"@io_etcd_go_etcd_raft_v3//:raft", | ||
"@io_etcd_go_etcd_raft_v3//tracker", | ||
], | ||
) | ||
|
||
go_test( | ||
name = "allocatorimpl_test", | ||
srcs = [ | ||
"allocator_scorer_test.go", | ||
"allocator_test.go", | ||
], | ||
embed = [":allocatorimpl"], | ||
deps = [ | ||
"//pkg/base", | ||
"//pkg/config/zonepb", | ||
"//pkg/gossip", | ||
"//pkg/keys", | ||
"//pkg/kv/kvserver/allocator", | ||
"//pkg/kv/kvserver/allocator/storepool", | ||
"//pkg/kv/kvserver/constraint", | ||
"//pkg/kv/kvserver/liveness/livenesspb", | ||
"//pkg/kv/kvserver/replicastats", | ||
"//pkg/roachpb", | ||
"//pkg/rpc", | ||
"//pkg/settings/cluster", | ||
"//pkg/testutils", | ||
"//pkg/testutils/gossiputil", | ||
"//pkg/util", | ||
"//pkg/util/hlc", | ||
"//pkg/util/leaktest", | ||
"//pkg/util/log", | ||
"//pkg/util/metric", | ||
"//pkg/util/stop", | ||
"//pkg/util/tracing", | ||
"@com_github_cockroachdb_errors//:errors", | ||
"@com_github_kr_pretty//:pretty", | ||
"@com_github_olekukonko_tablewriter//:tablewriter", | ||
"@com_github_stretchr_testify//assert", | ||
"@com_github_stretchr_testify//require", | ||
"@io_etcd_go_etcd_raft_v3//:raft", | ||
"@io_etcd_go_etcd_raft_v3//tracker", | ||
], | ||
) |
Oops, something went wrong.