Commit Graph

111 Commits

Author SHA1 Message Date
Derrick Hammer 0679a7cc3b
refactor: add a sync.Map, and lock parallel uploads in a mutex keyed by the hash and tus upload id, check if it already exists, and if so, abort. 2024-03-28 21:20:44 -04:00
Derrick Hammer d810cf0848
fix: don't error if IsFinal 2024-03-28 18:08:13 -04:00
Derrick Hammer a54238d4b6
feat: add TusHandler::Uploads 2024-03-28 17:43:32 -04:00
Derrick Hammer b267ace017
fix: ignore exists check if we are in partial/parallel upload mode 2024-03-28 17:41:17 -04:00
Derrick Hammer a8f62fd666
refactor: add option to SaveUpload so we have the option not to change an upload record if we are uploading or importing a file 2024-03-21 15:46:02 -04:00
Derrick Hammer 6c60dae743
fix: if the render end is 0, ensure the range header is valid syntax and skip it 2024-03-10 11:53:24 -04:00
Derrick Hammer e89a9450e9
fix: don't tie contexts to tus http context 2024-03-09 16:55:10 -05:00
Derrick Hammer f3040399e4
feat: add GetUploadSize 2024-03-09 15:37:16 -05:00
Derrick Hammer 2bff5d2b9e
refactor: switch to new libs5 kv db interface 2024-03-09 06:58:32 -05:00
Derrick Hammer 3e4eed12ae
fix: typo 2024-03-07 04:38:56 -05:00
Derrick Hammer dcbc54cec5
refactor: set p2p.max_connection_attempts to 10 2024-03-05 15:16:31 -05:00
Derrick Hammer 99a6f3a2f6
fix: StorageLocationTypeFile/StorageLocationTypeFull expiry should be an hour 2024-02-29 10:16:16 -05:00
Derrick Hammer e32a9b2070
fix: only say we have the file if no error 2024-02-29 09:55:51 -05:00
Derrick Hammer 5878d1557f
refactor: switch using hkdf for child key 2024-02-27 11:10:46 -05:00
Derrick Hammer 9782907c90
fix: increase iterations to 600k 2024-02-27 09:54:11 -05:00
Derrick Hammer 1ca46dddd4
fix: use proto.identity 2024-02-27 09:15:18 -05:00
Derrick Hammer b5509f11d1
fix: use a deterministic child key 2024-02-27 09:11:17 -05:00
Derrick Hammer 218c0a1b1a
fix: used a named sub-logger 2024-02-27 04:14:18 -05:00
Derrick Hammer 89c03f9cee
fix: pass context.Background() 2024-02-27 03:43:34 -05:00
Derrick Hammer 86dc8c8b9a
fix: pass ctx on protocol Stop 2024-02-27 03:36:09 -05:00
Derrick Hammer 43eb8c3e9a
refactor: add ctx to protocol Init 2024-02-27 03:35:43 -05:00
Derrick Hammer 5dfedeb66a
fix: need to squash embedded config 2024-02-27 03:18:02 -05:00
Derrick Hammer 5ed22efa83
fix: wrong peers key 2024-02-27 03:06:32 -05:00
Derrick Hammer 5b210de198
refactor: use job terminology for consistency 2024-02-25 07:52:28 -05:00
Derrick Hammer d618f08275
refactor: rename RetryableTask to RetryableJob 2024-02-25 07:49:22 -05:00
Derrick Hammer f47552bf60
refactor: move s3 client creation to a factory method on storage for re-usability 2024-02-24 10:34:49 -05:00
Derrick Hammer 3c1e60c3d2
feat: convert zap logger to slogger for tusd 2024-02-24 09:33:24 -05:00
Derrick Hammer 1a9fa9c4be
fix: Config should embed a pointer to s5config.NodeConfig 2024-02-23 08:18:05 -05:00
Derrick Hammer 9932e6194e
fix: update error message 2024-02-22 03:44:27 -05:00
Derrick Hammer a6218e9b7c
fix: need to update config management in s5 protocol 2024-02-22 03:27:40 -05:00
Derrick Hammer 7f12ee5b0d
refactor: implement new configuration management system 2024-02-22 02:13:59 -05:00
Derrick Hammer 901c68fdfc
refactor: have the forward slash always prefixed at the renter abstraction 2024-02-18 03:30:42 -05:00
Derrick Hammer 0e61a5c1fa
chore: dont log proof, too large 2024-02-18 02:29:33 -05:00
Derrick Hammer 0873dee1f3
fix: use a background ctx 2024-02-18 00:27:19 -05:00
Derrick Hammer 88a636ba9c
refactor: pass only the upload hash to the cron task 2024-02-18 00:23:25 -05:00
Derrick Hammer 15750acec0
fix: check for error 2024-02-18 00:04:28 -05:00
Derrick Hammer 8a32e69b06
fix: use storageProtocol 2024-02-18 00:01:01 -05:00
Derrick Hammer 517abe9193
fix: unneeded cast 2024-02-18 00:00:02 -05:00
Derrick Hammer 16ed748bfb
fix: cast to uint not uint64 2024-02-17 23:58:31 -05:00
Derrick Hammer 2ce26239da
fix: add missing tus background worker 2024-02-17 23:55:25 -05:00
Derrick Hammer fc042570ab
refactor: change to store the hash as a raw, but also make it unique with an index 2024-02-17 23:17:26 -05:00
Derrick Hammer 162af1e274
refactor: switch to using package init functions with build tags to selectively build protocol support 2024-02-17 07:40:22 -05:00
Derrick Hammer ac9a1a0b92
feat: implement StorageProtocol 2024-02-17 05:20:42 -05:00
Derrick Hammer 263473db41
refactor: add PreInit and Node setter to store s5 node 2024-02-17 05:16:52 -05:00
Derrick Hammer 997e362d90
refactor: add concept of a pre-init function that gets called before init 2024-02-17 05:16:24 -05:00
Derrick Hammer 0ac4d318b7
refactor: use a lazy setter approach for storageProtocol 2024-02-17 04:41:12 -05:00
Derrick Hammer 97297036c7
refactor: swap Protocol for to StorageProtocol 2024-02-17 04:06:25 -05:00
Derrick Hammer b52383b123
refactor: add StorageProtocol to S5ProtocolResult 2024-02-17 04:05:42 -05:00
Derrick Hammer 6f3f6015fe
fix: TusHandlerParams missing fx.In 2024-02-17 03:38:44 -05:00
Derrick Hammer cdd458129b
fix: initParams missing fx.In 2024-02-17 03:33:55 -05:00