tusd/pkg/handler/composer_test.go

24 lines
423 B
Go
Raw Normal View History

package handler_test
import (
"github.com/tus/tusd/v2/pkg/filestore"
"github.com/tus/tusd/v2/pkg/handler"
"github.com/tus/tusd/v2/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)
}