Skip to content

Commit 4993855

Browse files
committed
kvserver: make leaderlessWatcher constructor private
The struct itself is private. Epic: none Release note: None
1 parent 2993649 commit 4993855

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/kv/kvserver/replica.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ type leaderlessWatcher struct {
208208
closedChannel chan struct{}
209209
}
210210

211-
// NewLeaderlessWatcher initializes a new leaderlessWatcher with the default
211+
// newLeaderlessWatcher initializes a new leaderlessWatcher with the default
212212
// values.
213-
func NewLeaderlessWatcher(r *Replica) *leaderlessWatcher {
213+
func newLeaderlessWatcher(r *Replica) *leaderlessWatcher {
214214
closedCh := make(chan struct{})
215215
close(closedCh)
216216
return &leaderlessWatcher{

pkg/kv/kvserver/replica_init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func newUninitializedReplicaWithoutRaftGroup(
242242
r.breaker = newReplicaCircuitBreaker(
243243
store.cfg.Settings, store.stopper, r.AmbientContext, r, onTrip, onReset,
244244
)
245-
r.LeaderlessWatcher = NewLeaderlessWatcher(r)
245+
r.LeaderlessWatcher = newLeaderlessWatcher(r)
246246
r.shMu.currentRACv2Mode = r.replicationAdmissionControlModeToUse(context.TODO())
247247
r.raftMu.flowControlLevel = kvflowcontrol.GetV2EnabledWhenLeaderLevel(
248248
r.raftCtx, store.ClusterSettings(), store.TestingKnobs().FlowControlTestingKnobs)

0 commit comments

Comments
 (0)