func (f *factory) IssuerFor(issuer v1alpha1.GenericIssuer) (issuer.Interface, error) {
	issuerType, err := NameForIssuer(issuer)
	if err != nil {
		return nil, fmt.Errorf("could not get issuer type: %s", err.Error())
	}

	constructorsLock.RLock()
	defer constructorsLock.RUnlock()
	if constructor, ok := constructors[issuerType]; ok {
		return constructor(f.ctx, issuer)
	}

	return nil, fmt.Errorf("issuer '%s' not registered", issuerType)
}
// IssuerFor will return an Issuer interface for the given Issuer. If the
// requested Issuer is not registered, an error will be returned.
// A new instance of the Issuer will be returned for each call to IssuerFor,
// however this is an inexpensive operation and so, Issuers should not need
// to be cached and reused.
IssuerFor will return an Issuer interface for the given Issuer. If the
requested Issuer is not registered, an error will be returned.
A new instance of the Issuer will be returned for each call to IssuerFor,
however this is an inexpensive operation and so, Issuers should not need
to be cached and reused.
// IssuerFor will return an Issuer interface for the given Issuer . If the // requested Issuer is not registered an error will be returned . // A new instance of the Issuer will be returned for each call to IssuerFor // however this is an inexpensive operation and so Issuers should not need // to be cached and reused .
func (f *factory) IssuerFor(issuer v1alpha1.GenericIssuer) (issuer.Interface, error) {
	issuerType, err := NameForIssuer(issuer)
	if err != nil {
		return nil, fmt.Errorf("could not get issuer type: %s", err.Error())
	}
	constructorsLock.RLock()
	defer constructorsLock.RUnlock()
	if constructor, ok := constructors[issuerType]; ok {
		return constructor(f.ctx, issuer)
	}
	return nil, fmt.Errorf("issuer '%s' not registered", issuerType)
}
func ( f * factory ) IssuerFor ( issuer v1alpha1 . GenericIssuer ) ( issuer . Interface , error ) { issuerType , err := NameForIssuer ( issuer ) if err != nil { return nil , fmt . Errorf ( " " , err . Error ( ) ) } constructorsLock . RLock ( ) defer constructorsLock . RUnlock ( ) if constructor , ok := constructors [ issuerType ] ; ok { return constructor ( f . ctx , issuer ) } return nil , fmt . Errorf ( " " , issuerType ) }
IssuerFor will return an Issuer interface for the given Issuer.
IssuerFor will return an Issuer interface for the given Issuer .