8 Commits
Author SHA1 Message Date
Jonathan Boulle 9685f37575 *: adjust copyright header
Inspired by a similar change in the Kubernetes project [1], this changes
the copyright header to the more generic "The rkt Authors" rather than
"CoreOS, Inc.", which is only sometimes correct.

https://github.com/GoogleCloudPlatform/kubernetes/commit/6b3a6e6b983f967c88d14d26542ec6e30c49ebd3
2015-05-03 14:29:15 -07:00
Simone Gotti deea994424 lock: convert DirLock to handle also locks on regular files.
This patch renames DirLock to FileLock (where a file can be a regular file or a
directory), adds a new LockType type to specify if the lock must be on a
directory or on a regular file and checks if the file is valid for the
requested type.
2015-03-26 14:09:10 +01:00
Vito Caputo 6cc9661f2d pkg/lock: add DirLock.Unlock()
In creating a more general interface to the container dirs a method for
unlocking a DirLock without closing it became necessary.

This should have been added when lock.NewLock() became public.
2015-01-12 17:12:27 -08:00
Vito Caputo 85fab753da Merge pull request #309 from vcaputo/dirlock
pkg/lock: refactor DirLock to facilitate discrete opens
2014-12-30 10:57:54 -08:00
Vito Caputo 3c146d364a pkg/lock: refactor DirLock to facilitate discrete opens
This also restores atomic lock conversions

 * Discard DirLock interface
 * Convert private lock struct into public DirLock
 * Convert private newLock function to public NewLock
 * Introduce receiver-based analogs of all acquisition functions
 * Convert existing open+acquire functions to use the public receiver-based
   acquistion functions.
2014-12-30 10:45:13 -08:00
Jonathan Boulle 6dece1122d *: add license header to all source files
h/t @johndeng for raising this in #305
2014-12-29 17:34:05 -08:00
gprggr 932557f027 Update dir_test.go 2014-12-27 23:24:07 +01:00
Jonathan Boulle 0bbeeaae92 pkg/lock: add DirLock tests 2014-12-24 11:02:26 -08:00