From 14285e971d88b9f822d311f8c2ecbef74dbc08b8 Mon Sep 17 00:00:00 2001 From: Marius Date: Fri, 25 Dec 2015 21:33:58 +0100 Subject: [PATCH] Add documentation for FileLocker --- filestore/filelock.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/filestore/filelock.go b/filestore/filelock.go index 8184a5d..8022820 100644 --- a/filestore/filelock.go +++ b/filestore/filelock.go @@ -8,6 +8,13 @@ import ( "github.com/tus/tusd" ) +// FileLocker provides an exclusive upload locking mechansim using lock files +// which are stored on disk. Each of them stores the PID of the process which +// aquired the lock. This allows locks to be automatically freed when a process +// is unable to release it on its own because the process is not alive anymore. +// +// Please consult the package lockingstore for instructions on how to use this +// locker. type FileLocker struct { // Relative or absolute path to store the locks in. Path string