func NewRegistry() Registry {
	return &stateStoreRegistry{
		stateStores: map[string]func() state.Store{},
	}
}
NewRegistry is used to create state store registry.
package state
import (
	"strings"
	"github.com/pkg/errors"
	"github.com/dapr/components-contrib/state"
	"github.com/dapr/dapr/pkg/components"
)
type State struct {
	Name          string
	FactoryMethod func() state.Store
}
func New(name string, factoryMethod func() state.Store) State {
	return State{
		Name:          name,
		FactoryMethod: factoryMethod,
	}
}
type Registry interface {
	Register(components ...State)
	Create(name, version string) (state.Store, error)
}
type stateStoreRegistry struct {
	stateStores map[string]func() state.Store
}