diff --git a/shared/shared.go b/shared/shared.go new file mode 100644 index 0000000..4c7454a --- /dev/null +++ b/shared/shared.go @@ -0,0 +1,35 @@ +package shared + +import ( + "github.com/golang-queue/queue" + "github.com/tus/tusd/pkg/filestore" + tusd "github.com/tus/tusd/pkg/handler" +) + +var tusQueue *queue.Queue +var tusStore *filestore.FileStore +var tusComposer *tusd.StoreComposer + +func SetTusQueue(q *queue.Queue) { + tusQueue = q +} + +func GetTusQueue() *queue.Queue { + return tusQueue +} + +func SetTusStore(s *filestore.FileStore) { + tusStore = s +} + +func GetTusStore() *filestore.FileStore { + return tusStore +} + +func SetTusComposer(c *tusd.StoreComposer) { + tusComposer = c +} + +func GetTusComposer() *tusd.StoreComposer { + return tusComposer +}