Commit Graph

25 Commits

Author SHA1 Message Date
Marius 02c5942843 core: Use context package from Go stdlib 2019-06-11 16:16:02 +02:00
Marius d23be46d7a
core: Add ability to stop upload from post-receive hook (#279)
* First implementation of stopping an upload from the server

* Remove unnecessary json tag

* Use golang.org/x/net/context for support in Go < 1.7
2019-05-26 20:56:51 +01:00
Adam Jensen 55f99cb34a Add LengthDeferrerDataStore interface 2018-06-03 12:57:39 -04:00
Adam Jensen 82bc04cb36 Add SizeIsDeferred to FileInfo 2018-06-03 12:56:02 -04:00
Marius 513fe9fcf3 Correct linting issue and misspellings 2016-09-27 22:10:16 +02:00
Marius 21ae1c45a7 Add initial draft of StoreComposr 2016-02-21 23:25:35 +01:00
Marius b6a28421af Extract concatenation into own interface 2016-01-20 15:33:17 +01:00
Marius c9207d8c5f Extract GetReader into own interface 2016-01-19 22:32:15 +01:00
Marius cbf08de13d Add documentation for FinisherDataStore 2016-01-17 15:34:27 +01:00
Marius b6d67debee Merge branch 'master' into s3
Conflicts:
	datastore.go
2015-12-27 00:48:06 +01:00
Marius 4af7434c10 Move terminating method in own interface
In addition, the DELETE handler is only provided if the TerminaterDataStore
interface is implemented.
2015-12-27 00:44:02 +01:00
Marius f6a5530df8 Integrate LockingStore into UnroutedHandler
The reason behind this drastic move was that sometimes a lock needs to
persist across multiple calls to a DataStore. For example, when a PATCH
request is received, following behaviour is wanted:
	* Obtain lock (LockUpload)
	* Get offset, size etc (GetInfo)
	* Write data (WriteChunk)
	* Release lock (UnlockUpload)
However, before this change, the lock would be release and then obtained again
after the GetInfo and before the WriteChunk call. This resulted in an
inefficient resource usage and even a possible race condition.

The effects of this change was:
* FileLocker is now directly integrated into FileStore and not sperarated
* LockingStore and the entire package has been removed
* MemoryLocker has been moved into its very own package
2015-12-26 21:23:09 +01:00
Marius ad5e486ba0 Merge master 2015-12-08 22:08:54 +01:00
anirudt 1e0b37a9a8 Fixes typo in datastore.go
fixes two occurences of the word interpreted
in datastore.go
2015-11-19 19:48:26 +05:30
Acconut 2c78d31c27 Close io.Reader if possible 2015-07-28 14:58:52 +02:00
Acconut 290fea5dac return new offset after successful PATCH request 2015-03-23 19:02:12 +01:00
Acconut c49f7bbf91 uppercase ID and URL to match golint 2015-03-23 17:58:13 +01:00
Acconut 9f94d0591b add support for Termination extension 2015-02-28 14:47:39 +01:00
Acconut 2b66ccfd56 refactor tests using httpTest 2015-02-17 15:44:12 +01:00
Acconut 93eb701e14 add concatenation extension 2015-02-17 14:19:56 +01:00
Acconut 0c16aedc29 use tusd.FileInfo in DataStore.NewUpload 2015-02-16 17:53:50 +01:00
Acconut 29100e3b5b add GET route for downloading uploads 2015-02-06 22:05:33 +01:00
Acconut 99ca34e1ce format FileStore 2015-02-03 19:01:22 +01:00
Acconut f513d02938 add documentation 2015-02-01 16:17:56 +01:00
Acconut a70bd4cfa3 rewrite tusd
* expose tusd.DataStore and extracted FileStore
* use pat for routing
* allow absolute BasePaths
* requires StripPrefix
* add support for 1.0 core
* update date in license
2015-02-01 14:57:57 +01:00