Skip to content

Commit f4ec6cd

Browse files
ratelimits: Refactor Reset() to accept Transactions
1 parent 1f6ec8c commit f4ec6cd

File tree

9 files changed

+158
-76
lines changed

9 files changed

+158
-76
lines changed

ra/ra.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,8 +1438,13 @@ func (ra *RegistrationAuthorityImpl) countFailedValidations(ctx context.Context,
14381438
// resetAccountPausingLimit resets bucket to maximum capacity for given account.
14391439
// There is no reason to surface errors from this function to the Subscriber.
14401440
func (ra *RegistrationAuthorityImpl) resetAccountPausingLimit(ctx context.Context, regId int64, ident identifier.ACMEIdentifier) {
1441-
bucketKey := ratelimits.NewRegIdIdentValueBucketKey(ratelimits.FailedAuthorizationsForPausingPerDomainPerAccount, regId, ident.Value)
1442-
err := ra.limiter.Reset(ctx, bucketKey)
1441+
txns, err := ra.txnBuilder.NewPausingResetTransactions(regId, ident)
1442+
if err != nil {
1443+
ra.log.Warningf("building reset transaction for regID=[%d] identifier=[%s]: %s", regId, ident.Value, err)
1444+
return
1445+
}
1446+
1447+
err = ra.limiter.BatchReset(ctx, txns)
14431448
if err != nil {
14441449
ra.log.Warningf("resetting bucket for regID=[%d] identifier=[%s]: %s", regId, ident.Value, err)
14451450
}

ra/ra_test.go

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,8 @@ func TestPerformValidation_FailedValidationsTriggerPauseIdentifiersRatelimit(t *
715715
domain := randomDomain()
716716
ident := identifier.NewDNS(domain)
717717
authzPB := createPendingAuthorization(t, sa, registration.Id, ident, fc.Now().Add(12*time.Hour))
718-
bucketKey := ratelimits.NewRegIdIdentValueBucketKey(ratelimits.FailedAuthorizationsForPausingPerDomainPerAccount, authzPB.RegistrationID, ident.Value)
718+
bucketKey, err := ratelimits.BuildBucketKey(ratelimits.FailedAuthorizationsForPausingPerDomainPerAccount, authzPB.RegistrationID, ident, nil, netip.Addr{})
719+
test.AssertNotError(t, err, "building bucket key")
719720

720721
// Set the stored TAT to indicate that this bucket has exhausted its quota.
721722
err = rl.BatchSet(context.Background(), map[string]time.Time{
@@ -758,15 +759,17 @@ func TestPerformValidation_FailedValidationsTriggerPauseIdentifiersRatelimit(t *
758759

759760
// mockRLSourceWithSyncDelete is a mock ratelimits.Source that forwards all
760761
// method calls to an inner Source, but also performs a blocking write to a
761-
// channel when Delete is called to allow the tests to synchronize.
762+
// channel when BatchDelete is called to allow the tests to synchronize.
762763
type mockRLSourceWithSyncDelete struct {
763764
ratelimits.Source
764765
out chan<- string
765766
}
766767

767-
func (rl mockRLSourceWithSyncDelete) Delete(ctx context.Context, bucketKey string) error {
768-
err := rl.Source.Delete(ctx, bucketKey)
769-
rl.out <- bucketKey
768+
func (rl mockRLSourceWithSyncDelete) BatchDelete(ctx context.Context, bucketKeys []string) error {
769+
err := rl.Source.BatchDelete(ctx, bucketKeys)
770+
for _, bucketKey := range bucketKeys {
771+
rl.out <- bucketKey
772+
}
770773
return err
771774
}
772775

@@ -791,7 +794,8 @@ func TestPerformValidation_FailedThenSuccessfulValidationResetsPauseIdentifiersR
791794
domain := randomDomain()
792795
ident := identifier.NewDNS(domain)
793796
authzPB := createPendingAuthorization(t, sa, registration.Id, ident, fc.Now().Add(12*time.Hour))
794-
bucketKey := ratelimits.NewRegIdIdentValueBucketKey(ratelimits.FailedAuthorizationsForPausingPerDomainPerAccount, authzPB.RegistrationID, ident.Value)
797+
bucketKey, err := ratelimits.BuildBucketKey(ratelimits.FailedAuthorizationsForPausingPerDomainPerAccount, authzPB.RegistrationID, ident, nil, netip.Addr{})
798+
test.AssertNotError(t, err, "building bucket key")
795799

796800
// Set a stored TAT so that we can tell when it's been reset.
797801
err = rl.BatchSet(context.Background(), map[string]time.Time{

ratelimits/gcra_test.go

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ func TestDecide(t *testing.T) {
1616
limit.precompute()
1717

1818
// Begin by using 1 of our 10 requests.
19-
d := maybeSpend(clk, Transaction{"test", limit, 1, true, true}, clk.Now())
19+
d := maybeSpend(clk, Transaction{"test", limit, 1, true, true, false}, clk.Now())
2020
test.Assert(t, d.allowed, "should be allowed")
2121
test.AssertEquals(t, d.remaining, int64(9))
2222
test.AssertEquals(t, d.retryIn, time.Duration(0))
2323
test.AssertEquals(t, d.resetIn, time.Second)
2424
// Transaction is set when we're allowed.
25-
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true})
25+
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true, false})
2626

2727
// Immediately use another 9 of our remaining requests.
28-
d = maybeSpend(clk, Transaction{"test", limit, 9, true, true}, d.newTAT)
28+
d = maybeSpend(clk, Transaction{"test", limit, 9, true, true, false}, d.newTAT)
2929
test.Assert(t, d.allowed, "should be allowed")
3030
test.AssertEquals(t, d.remaining, int64(0))
3131
// We should have to wait 1 second before we can use another request but we
@@ -37,21 +37,21 @@ func TestDecide(t *testing.T) {
3737
test.AssertEquals(t, d.newTAT, clk.Now().Add(time.Second*10))
3838

3939
// Let's try using just 1 more request without waiting.
40-
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
40+
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
4141
test.Assert(t, !d.allowed, "should not be allowed")
4242
test.AssertEquals(t, d.remaining, int64(0))
4343
test.AssertEquals(t, d.retryIn, time.Second)
4444
test.AssertEquals(t, d.resetIn, time.Second*10)
4545
// Transaction is set when we're denied.
46-
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true})
46+
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true, false})
4747

4848
// Let's try being exactly as patient as we're told to be.
4949
clk.Add(d.retryIn)
50-
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true}, d.newTAT)
50+
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true, false}, d.newTAT)
5151
test.AssertEquals(t, d.remaining, int64(1))
5252

5353
// We are 1 second in the future, we should have 1 new request.
54-
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
54+
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
5555
test.Assert(t, d.allowed, "should be allowed")
5656
test.AssertEquals(t, d.remaining, int64(0))
5757
test.AssertEquals(t, d.retryIn, time.Second)
@@ -61,7 +61,7 @@ func TestDecide(t *testing.T) {
6161
clk.Add(d.resetIn)
6262

6363
// We should have 10 new requests. If we use 1 we should have 9 remaining.
64-
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
64+
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
6565
test.Assert(t, d.allowed, "should be allowed")
6666
test.AssertEquals(t, d.remaining, int64(9))
6767
test.AssertEquals(t, d.retryIn, time.Duration(0))
@@ -72,7 +72,7 @@ func TestDecide(t *testing.T) {
7272

7373
// We should still have 9 remaining because we're still 1ms shy of the
7474
// refill time.
75-
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true}, d.newTAT)
75+
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true, false}, d.newTAT)
7676
test.Assert(t, d.allowed, "should be allowed")
7777
test.AssertEquals(t, d.remaining, int64(9))
7878
test.AssertEquals(t, d.retryIn, time.Duration(0))
@@ -83,15 +83,15 @@ func TestDecide(t *testing.T) {
8383
clk.Add(20 * time.Hour)
8484

8585
// C'mon, big money, no whammies, no whammies, STOP!
86-
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true}, d.newTAT)
86+
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true, false}, d.newTAT)
8787
test.Assert(t, d.allowed, "should be allowed")
8888
test.AssertEquals(t, d.remaining, int64(10))
8989
test.AssertEquals(t, d.retryIn, time.Duration(0))
9090
test.AssertEquals(t, d.resetIn, time.Duration(0))
9191

9292
// Turns out that the most we can accrue is 10 (limit.Burst). Let's empty
9393
// this bucket out so we can try something else.
94-
d = maybeSpend(clk, Transaction{"test", limit, 10, true, true}, d.newTAT)
94+
d = maybeSpend(clk, Transaction{"test", limit, 10, true, true, false}, d.newTAT)
9595
test.Assert(t, d.allowed, "should be allowed")
9696
test.AssertEquals(t, d.remaining, int64(0))
9797
// We should have to wait 1 second before we can use another request but we
@@ -101,14 +101,14 @@ func TestDecide(t *testing.T) {
101101
test.AssertEquals(t, d.resetIn, time.Second*10)
102102

103103
// If you spend 0 while you have 0 you should get 0.
104-
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true}, d.newTAT)
104+
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true, false}, d.newTAT)
105105
test.Assert(t, d.allowed, "should be allowed")
106106
test.AssertEquals(t, d.remaining, int64(0))
107107
test.AssertEquals(t, d.retryIn, time.Duration(0))
108108
test.AssertEquals(t, d.resetIn, time.Second*10)
109109

110110
// We don't play by the rules, we spend 1 when we have 0.
111-
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
111+
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
112112
test.Assert(t, !d.allowed, "should not be allowed")
113113
test.AssertEquals(t, d.remaining, int64(0))
114114
test.AssertEquals(t, d.retryIn, time.Second)
@@ -118,7 +118,7 @@ func TestDecide(t *testing.T) {
118118
clk.Add(d.retryIn)
119119

120120
// Our patience pays off, we should have 1 new request. Let's use it.
121-
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
121+
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
122122
test.Assert(t, d.allowed, "should be allowed")
123123
test.AssertEquals(t, d.remaining, int64(0))
124124
test.AssertEquals(t, d.retryIn, time.Second)
@@ -130,7 +130,7 @@ func TestDecide(t *testing.T) {
130130
// Attempt to spend 7 when we only have 5. We should be denied but the
131131
// decision should reflect a retry of 2 seconds, the time it would take to
132132
// refill from 5 to 7.
133-
d = maybeSpend(clk, Transaction{"test", limit, 7, true, true}, d.newTAT)
133+
d = maybeSpend(clk, Transaction{"test", limit, 7, true, true, false}, d.newTAT)
134134
test.Assert(t, !d.allowed, "should not be allowed")
135135
test.AssertEquals(t, d.remaining, int64(5))
136136
test.AssertEquals(t, d.retryIn, time.Second*2)
@@ -143,28 +143,28 @@ func TestMaybeRefund(t *testing.T) {
143143
limit.precompute()
144144

145145
// Begin by using 1 of our 10 requests.
146-
d := maybeSpend(clk, Transaction{"test", limit, 1, true, true}, clk.Now())
146+
d := maybeSpend(clk, Transaction{"test", limit, 1, true, true, false}, clk.Now())
147147
test.Assert(t, d.allowed, "should be allowed")
148148
test.AssertEquals(t, d.remaining, int64(9))
149149
test.AssertEquals(t, d.retryIn, time.Duration(0))
150150
test.AssertEquals(t, d.resetIn, time.Second)
151151
// Transaction is set when we're refunding.
152-
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true})
152+
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true, false})
153153

154154
// Refund back to 10.
155-
d = maybeRefund(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
155+
d = maybeRefund(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
156156
test.AssertEquals(t, d.remaining, int64(10))
157157
test.AssertEquals(t, d.retryIn, time.Duration(0))
158158
test.AssertEquals(t, d.resetIn, time.Duration(0))
159159

160160
// Refund 0, we should still have 10.
161-
d = maybeRefund(clk, Transaction{"test", limit, 0, true, true}, d.newTAT)
161+
d = maybeRefund(clk, Transaction{"test", limit, 0, true, true, false}, d.newTAT)
162162
test.AssertEquals(t, d.remaining, int64(10))
163163
test.AssertEquals(t, d.retryIn, time.Duration(0))
164164
test.AssertEquals(t, d.resetIn, time.Duration(0))
165165

166166
// Spend 1 more of our 10 requests.
167-
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
167+
d = maybeSpend(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
168168
test.Assert(t, d.allowed, "should be allowed")
169169
test.AssertEquals(t, d.remaining, int64(9))
170170
test.AssertEquals(t, d.retryIn, time.Duration(0))
@@ -174,16 +174,16 @@ func TestMaybeRefund(t *testing.T) {
174174
clk.Add(d.resetIn)
175175

176176
// Attempt to refund from 10 to 11.
177-
d = maybeRefund(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
177+
d = maybeRefund(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
178178
test.Assert(t, !d.allowed, "should not be allowed")
179179
test.AssertEquals(t, d.remaining, int64(10))
180180
test.AssertEquals(t, d.retryIn, time.Duration(0))
181181
test.AssertEquals(t, d.resetIn, time.Duration(0))
182182
// Transaction is set when our bucket is full.
183-
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true})
183+
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true, false})
184184

185185
// Spend 10 all 10 of our requests.
186-
d = maybeSpend(clk, Transaction{"test", limit, 10, true, true}, d.newTAT)
186+
d = maybeSpend(clk, Transaction{"test", limit, 10, true, true, false}, d.newTAT)
187187
test.Assert(t, d.allowed, "should be allowed")
188188
test.AssertEquals(t, d.remaining, int64(0))
189189
// We should have to wait 1 second before we can use another request but we
@@ -193,7 +193,7 @@ func TestMaybeRefund(t *testing.T) {
193193
test.AssertEquals(t, d.resetIn, time.Second*10)
194194

195195
// Attempt a refund of 10.
196-
d = maybeRefund(clk, Transaction{"test", limit, 10, true, true}, d.newTAT)
196+
d = maybeRefund(clk, Transaction{"test", limit, 10, true, true, false}, d.newTAT)
197197
test.AssertEquals(t, d.remaining, int64(10))
198198
test.AssertEquals(t, d.retryIn, time.Duration(0))
199199
test.AssertEquals(t, d.resetIn, time.Duration(0))
@@ -202,17 +202,17 @@ func TestMaybeRefund(t *testing.T) {
202202
clk.Add(11 * time.Second)
203203

204204
// Attempt to refund to 11, then ensure it's still 10.
205-
d = maybeRefund(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
205+
d = maybeRefund(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
206206
test.Assert(t, !d.allowed, "should be allowed")
207207
test.AssertEquals(t, d.remaining, int64(10))
208208
test.AssertEquals(t, d.retryIn, time.Duration(0))
209209
test.AssertEquals(t, d.resetIn, time.Duration(0))
210210
// Transaction is set when our TAT is in the past.
211-
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true})
211+
test.AssertEquals(t, d.transaction, Transaction{"test", limit, 1, true, true, false})
212212

213213
// Spend 5 of our 10 requests, then refund 1.
214-
d = maybeSpend(clk, Transaction{"test", limit, 5, true, true}, d.newTAT)
215-
d = maybeRefund(clk, Transaction{"test", limit, 1, true, true}, d.newTAT)
214+
d = maybeSpend(clk, Transaction{"test", limit, 5, true, true, false}, d.newTAT)
215+
d = maybeRefund(clk, Transaction{"test", limit, 1, true, true, false}, d.newTAT)
216216
test.Assert(t, d.allowed, "should be allowed")
217217
test.AssertEquals(t, d.remaining, int64(6))
218218
test.AssertEquals(t, d.retryIn, time.Duration(0))
@@ -221,15 +221,15 @@ func TestMaybeRefund(t *testing.T) {
221221
clk.Add(time.Millisecond * 2500)
222222

223223
// Ensure we have 8.5 requests.
224-
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true}, d.newTAT)
224+
d = maybeSpend(clk, Transaction{"test", limit, 0, true, true, false}, d.newTAT)
225225
test.Assert(t, d.allowed, "should be allowed")
226226
test.AssertEquals(t, d.remaining, int64(8))
227227
test.AssertEquals(t, d.retryIn, time.Duration(0))
228228
// Check that ResetIn represents the fractional earned request.
229229
test.AssertEquals(t, d.resetIn, time.Millisecond*1500)
230230

231231
// Refund 2 requests, we should only have 10, not 10.5.
232-
d = maybeRefund(clk, Transaction{"test", limit, 2, true, true}, d.newTAT)
232+
d = maybeRefund(clk, Transaction{"test", limit, 2, true, true, false}, d.newTAT)
233233
test.AssertEquals(t, d.remaining, int64(10))
234234
test.AssertEquals(t, d.retryIn, time.Duration(0))
235235
test.AssertEquals(t, d.resetIn, time.Duration(0))

ratelimits/limiter.go

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,29 @@ func (l *Limiter) BatchRefund(ctx context.Context, txns []Transaction) (*Decisio
434434
return batchDecision, nil
435435
}
436436

437-
// Reset resets the specified bucket to its maximum capacity. The new bucket
438-
// state is persisted to the underlying datastore before returning.
439-
func (l *Limiter) Reset(ctx context.Context, bucketKey string) error {
437+
// BatchReset resets the specified buckets to their maximum capacity using the
438+
// provided reset Transactions. The new bucket state is persisted to the
439+
// underlying datastore before returning.
440+
func (l *Limiter) BatchReset(ctx context.Context, txns []Transaction) error {
441+
var bucketKeys []string
442+
for _, txn := range txns {
443+
if txn.allowOnly() {
444+
// Ignore allow-only transactions.
445+
continue
446+
}
447+
if !txn.resetOnly() {
448+
return fmt.Errorf("found reset-only transaction, received check=%t spend=%t reset=%t", txn.check, txn.spend, txn.reset)
449+
}
450+
if slices.Contains(bucketKeys, txn.bucketKey) {
451+
return fmt.Errorf("found duplicate bucket %q in batch", txn.bucketKey)
452+
}
453+
bucketKeys = append(bucketKeys, txn.bucketKey)
454+
}
455+
if len(bucketKeys) == 0 {
456+
return nil
457+
}
440458
// Remove cancellation from the request context so that transactions are not
441459
// interrupted by a client disconnect.
442460
ctx = context.WithoutCancel(ctx)
443-
return l.source.Delete(ctx, bucketKey)
461+
return l.source.BatchDelete(ctx, bucketKeys)
444462
}

ratelimits/limiter_test.go

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ func setup(t *testing.T) (context.Context, map[string]*Limiter, *TransactionBuil
5959
}, newTestTransactionBuilder(t), clk, randIP.String()
6060
}
6161

62+
func mustReset(t *testing.T, l *Limiter, ctx context.Context, limit *Limit, bucketKey string) {
63+
t.Helper()
64+
txn, err := newResetTransaction(limit, bucketKey)
65+
test.AssertNotError(t, err, "txn should be valid")
66+
err = l.BatchReset(ctx, []Transaction{txn})
67+
test.AssertNotError(t, err, "should not error")
68+
}
69+
6270
func TestLimiter_CheckWithLimitOverrides(t *testing.T) {
6371
t.Parallel()
6472
testCtx, limiters, txnBuilder, clk, testIP := setup(t)
@@ -153,10 +161,8 @@ func TestLimiter_CheckWithLimitOverrides(t *testing.T) {
153161
test.AssertEquals(t, d.resetIn, time.Millisecond*50)
154162

155163
// Reset between tests.
156-
err = l.Reset(testCtx, overriddenBucketKey)
157-
test.AssertNotError(t, err, "should not error")
158-
err = l.Reset(testCtx, normalBucketKey)
159-
test.AssertNotError(t, err, "should not error")
164+
mustReset(t, l, testCtx, overriddenLimit, overriddenBucketKey)
165+
mustReset(t, l, testCtx, normalLimit, normalBucketKey)
160166

161167
// Spend the same bucket but in a batch with a Transaction that is
162168
// check-only. This should succeed, but the decision should reflect
@@ -238,8 +244,7 @@ func TestLimiter_CheckWithLimitOverrides(t *testing.T) {
238244
test.AssertEquals(t, d.resetIn, time.Millisecond*50)
239245

240246
// Reset between tests.
241-
err = l.Reset(testCtx, overriddenBucketKey)
242-
test.AssertNotError(t, err, "should not error")
247+
mustReset(t, l, testCtx, overriddenLimit, overriddenBucketKey)
243248
})
244249
}
245250
}
@@ -278,8 +283,7 @@ func TestLimiter_InitializationViaCheckAndSpend(t *testing.T) {
278283
test.AssertEquals(t, d.retryIn, time.Duration(0))
279284

280285
// Reset our bucket.
281-
err = l.Reset(testCtx, bucketKey)
282-
test.AssertNotError(t, err, "should not error")
286+
mustReset(t, l, testCtx, limit, bucketKey)
283287

284288
// Similar to above, but we'll use Spend() to actually initialize
285289
// the bucket. Spend should return the same result as Check.
@@ -400,8 +404,7 @@ func TestLimiter_RefundAndReset(t *testing.T) {
400404
test.AssertEquals(t, d.remaining, int64(0))
401405
test.AssertEquals(t, d.resetIn, time.Second)
402406

403-
err = l.Reset(testCtx, bucketKey)
404-
test.AssertNotError(t, err, "should not error")
407+
mustReset(t, l, testCtx, limit, bucketKey)
405408

406409
// Attempt to spend 20 more requests, this should succeed.
407410
d, err = l.Spend(testCtx, txn20)

ratelimits/names.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ func BuildBucketKey(name Name, regId int64, singleIdent identifier.ACMEIdentifie
409409
if err != nil {
410410
return "", err
411411
}
412-
return NewRegIdIdentValueBucketKey(name, regId, coveringIdent), nil
412+
return newRegIdIdentValueBucketKey(name, regId, coveringIdent), nil
413413
}
414414
if regId == 0 {
415415
return "", makeMissingErr("regId")
@@ -429,7 +429,7 @@ func BuildBucketKey(name Name, regId int64, singleIdent identifier.ACMEIdentifie
429429
return "", makeMissingErr("regId")
430430
}
431431
// Default: use 'enum:regId:identValue' bucket key format.
432-
return NewRegIdIdentValueBucketKey(name, regId, singleIdent.Value), nil
432+
return newRegIdIdentValueBucketKey(name, regId, singleIdent.Value), nil
433433
}
434434
if regId == 0 {
435435
return "", makeMissingErr("regId")

0 commit comments

Comments
 (0)