[unsure] patch wrappedProvisioner glitch

pull/1688/head
Panagiotis Siatras 5 months ago
parent d701368f23
commit 39c8162f0c
No known key found for this signature in database

@ -968,7 +968,16 @@ func (a *Authority) startCRLGenerator() error {
func (a *Authority) incrProvisionerCounter(prov *provisioner.Interface, err *error, count func(Meter, string, bool)) {
var name string
if p := *prov; p != nil {
name = p.GetName()
// TODO(@azazeal): ???
switch x := p.(type) {
case *wrappedProvisioner:
if x.Interface != nil {
name = x.GetName()
}
default:
name = x.GetName()
}
}
count(a.meter, name, *err == nil)
@ -977,7 +986,16 @@ func (a *Authority) incrProvisionerCounter(prov *provisioner.Interface, err *err
func (a *Authority) incrWebhookCounter(prov provisioner.Interface, err error, count func(Meter, string, bool)) {
var name string
if prov != nil {
name = prov.GetName()
// TODO(@azazeal): ???
switch x := prov.(type) {
case *wrappedProvisioner:
if x.Interface != nil {
name = x.GetName()
}
default:
name = x.GetName()
}
}
count(a.meter, name, err == nil)

Loading…
Cancel
Save