func FromParameters(parameters map[string]interface{}) (*Driver, error) {
	params, err := fromParametersImpl(parameters)
	if err != nil || params == nil {
		return nil, err
	}
	return New(*params), nil
}
FromParameters constructs a new Driver with a given parameters map
Optional Parameters:
- rootdirectory
- maxthreads
package filesystem
import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path"
	"reflect"
	"strconv"
	"time"
	"github.com/docker/distribution/context"
	storagedriver "github.com/docker/distribution/registry/storage/driver"
	"github.com/docker/distribution/registry/storage/driver/base"
	"github.com/docker/distribution/registry/storage/driver/factory"
)
const (
	driverName           = "filesystem"
	defaultRootDirectory = "/var/lib/registry"
	defaultMaxThreads    = uint64(100)
	minThreads = uint64(25)
)
type DriverParameters struct {
	RootDirectory string
	MaxThreads    uint64
}
func init() {
	factory.Register(driverName, &filesystemDriverFactory{})
}
type filesystemDriverFactory struct{}
func (factory *filesystemDriverFactory) Create(parameters map[string]interface{}) (storagedriver.StorageDriver, error) {
	return FromParameters(parameters)
}
type driver struct {
	rootDirectory string
}
type baseEmbed struct {
	base.Base
}
type Driver struct {
	baseEmbed
}