func (r *Registry) Reconcilers() []approver.Reconciler {
	r.lock.RLock()
	defer r.lock.RUnlock()
	var reconcilers []approver.Reconciler
	for _, reconciler := range r.approvers {
		reconcilers = append(reconcilers, reconciler)
	}
	return reconcilers
}
Reconcilers returns the list of Reconcilers that have been registered as
Approvers to the registry.
package registry
import (
	"sync"
	"github.com/cert-manager/approver-policy/pkg/approver"
)
var (
	Shared = &Registry{}
)
type Registry struct {
	lock      sync.RWMutex
	approvers []approver.Interface
}
func (r *Registry) Store(approvers ...approver.Interface) *Registry {
	r.lock.Lock()
	defer r.lock.Unlock()
	for _, existing := range r.approvers {
		for _, toStore := range approvers {
			if existing.Name() == toStore.Name() {
				panic("approver already registered with same name: " + toStore.Name())
			}
		}
	}
	r.approvers = append(r.approvers, approvers...)
	return r
}
func (r *Registry) Approvers() []approver.Interface {
	r.lock.RLock()
	defer r.lock.RUnlock()
	return r.approvers
}
func (r *Registry) Evaluators() []approver.Evaluator {
	r.lock.RLock()
	defer r.lock.RUnlock()
	var evaluators []approver.Evaluator
	for _, approver := range r.approvers {
		evaluators = append(evaluators, approver)
	}
	return evaluators
}
func (r *Registry) Webhooks() []approver.Webhook {
	r.lock.RLock()
	defer r.lock.RUnlock()
	var webhooks []approver.Webhook
	for _, approver := range r.approvers {
		webhooks = append(webhooks, approver)
	}
	return webhooks
}