tusd/pkg/handler/composer_test.go

24 lines
414 B
Go

package handler_test
import (
"github.com/tus/tusd/pkg/filestore"
"github.com/tus/tusd/pkg/handler"
"github.com/tus/tusd/pkg/memorylocker"
)
func ExampleNewStoreComposer() {
composer := handler.NewStoreComposer()
fs := filestore.New("./data")
fs.UseIn(composer)
ml := memorylocker.New()
ml.UseIn(composer)
config := handler.Config{
StoreComposer: composer,
}
_, _ = handler.NewHandler(config)
}