cockroachdb/cockroach
base
pkg/base/ holds primitive server-config types. It exists to break circular imports between pkg/server/, pkg/cli/, pkg/security/, and pkg/kv/kvserver/, all of which need to share configuration types without depending on each other.
What's in it
config.go—ConfigandRaftConfig.addr_validation.go— host:port parsing and validation.cluster_id.go—ClusterIDContainer(atomically-set cluster ID).node_id.go—NodeIDContainer.store_spec.go—--store=...flag parsing forcockroach start.tenant_id.go—TenantIDContainer.test_*.go— small test helpers.
Why it's a separate package
The container types (ClusterIDContainer, NodeIDContainer) provide atomic accessors over an int that can be set once. They are reachable from both KV and SQL layers without either depending on the other.
Related pages
- Server — populates
base.Config. - packages/roachpb — defines the typed IDs that
basecontainers wrap.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.