24 lines
423 B
Go
24 lines
423 B
Go
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)
|
|
}
|