func NewRegistry() Registry {
	return &nameResolutionRegistry{
		resolvers: map[string]func() nr.Resolver{},
	}
}
NewRegistry creates a name resolution registry.
package nameresolution
import (
	"strings"
	"github.com/pkg/errors"
	nr "github.com/dapr/components-contrib/nameresolution"
	"github.com/dapr/dapr/pkg/components"
)
type (
	NameResolution struct {
		Name          string
		FactoryMethod func() nr.Resolver
	}
	Registry interface {
		Register(components ...NameResolution)
		Create(name, version string) (nr.Resolver, error)
	}
	nameResolutionRegistry struct {
		resolvers map[string]func() nr.Resolver
	}
)
func New(name string, factoryMethod func() nr.Resolver) NameResolution {
	return NameResolution{
		Name:          name,
		FactoryMethod: factoryMethod,
	}
}