func New(processor dochandler.Processor, metrics metricsProvider, opts ...Option) *UpdateHandler {
	dh := &UpdateHandler{
		coreProcessor: processor,
		metrics:       metrics,
	}
	for _, opt := range opts {
		opt(dh)
	}
	return dh
}
New creates a new document update handler.
package updatehandler
import (
	"encoding/json"
	"time"
	"github.com/hyperledger/aries-framework-go/spi/storage"
	"github.com/trustbloc/edge-core/pkg/log"
	"github.com/trustbloc/sidetree-core-go/pkg/document"
	"github.com/trustbloc/sidetree-core-go/pkg/restapi/dochandler"
	"github.com/trustbloc/orb/pkg/document/util"
)
var logger = log.New("orb-update-handler")
type metricsProvider interface {
	DocumentCreateUpdateTime(duration time.Duration)
}
type Option func(opts *UpdateHandler)
func WithCreateDocumentStore(store storage.Store) Option {
	return func(opts *UpdateHandler) {
		opts.store = store
		opts.createDocumentStoreEnabled = true
	}
}
type UpdateHandler struct {
	coreProcessor dochandler.Processor
	store         storage.Store
	metrics       metricsProvider
	createDocumentStoreEnabled bool
}