Commit graph

11 commits

Author SHA1 Message Date
Brian Bland
68fd15b688 Miscellaneous storagedriver+ipc fixes
Fixes/tests listing for keys beginning with "/"
No longer extraneously wraps Closers in ioutil.NopClosers
Uses omitempty for all ipc struct type fields
2014-11-20 14:14:55 -08:00
Brian Bland
a3481c5f1c Adds ability to unwrap ipc errors into their original type
This only works for a specific whitelist of error types, which is
currently all errors in the storagedriver package.

Also improves storagedriver tests to enforce proper error types are
returned
2014-11-18 17:41:48 -08:00
Brian Bland
88795e0a14 Lots of various golint fixes
Changes some names to match go conventions
Comments all exported methods
Removes dot imports
2014-11-17 15:46:06 -08:00
Olivier Gambier
da205085f3 Merge pull request #686 from BrianBland/storagedriver-versioning
Adds versioning for out-of-process storage driver
2014-11-07 14:55:13 -08:00
Brian Bland
cb1bdacbe3 Renames ResumeWritePosition to CurrentSize in storage driver api 2014-11-07 12:58:48 -08:00
Brian Bland
1ae5485998 Adds versioning for out-of-process storage driver
The registry currently only accepts storage driver versions with the
same major version and an equal or lower minor version as its own
current storage driver api version, but this may be changed in the
future if we decide to implement specific version cross-compatibility.
2014-11-06 12:16:14 -08:00
Brian Bland
b522fbd675 Removes WrapReader boilerplate for updates to libchan
libchan now supports io.ReadCloser and io.WriteCloser, so we don't need
io.ReadWriteCloser wrapping
2014-10-31 11:50:02 -07:00
Brian Bland
0e5d41ff9b Updates documentation to follow godoc conventions 2014-10-29 16:44:26 -07:00
Brian Bland
ca0084fad1 Adds StorageDriverFactory, unifying creation of StorageDrivers
Custom storage drivers can register a factory to create the driver by
name, similar to the database/sql package's Register and Open
factory.Create returns an in-process driver if registered or an IPC
driver if one can be found, erroring otherwise
This standardizes parameter passing for creation of storage drivers

Also adds documentation for storagedriver package and children
2014-10-28 18:21:06 -07:00
Brian Bland
7c892deb1c Uses streams internally for ipc Get/Put Content
This is done because libchan/spdystream does not currently support sending
serialzied objects of size larger than 16MB
See https://github.com/docker/libchan/issues/65
2014-10-24 18:44:36 -07:00
Brian Bland
3f95694180 Adds storage driver interface, tests, and two basic implementations 2014-10-22 10:50:43 -07:00