Merge pull request #686 from BrianBland/storagedriver-versioning
Adds versioning for out-of-process storage driver
This commit is contained in:
commit
da205085f3
5 changed files with 106 additions and 17 deletions
|
@ -40,6 +40,8 @@ Storage drivers should call `factory.Register` with their driver name in an `ini
|
|||
### Out-of-process drivers
|
||||
As many users will run the registry as a pre-constructed docker container, storage drivers should also be distributable as IPC server executables. Drivers written in go should model the main method provided in `storagedriver/filesystem/registry-storage-filesystem/filesystem.go`. Parameters to IPC drivers will be provided as a JSON-serialized map in the first argument to the process. These parameters should be validated and then a blocking call to `ipc.StorageDriverServer` should be made with a new storage driver.
|
||||
|
||||
Out-of-process drivers must also implement the `ipc.IPCStorageDriver` interface, which exposes a `Version` check for the storage driver. This is used to validate storage driver api compatibility at driver load-time.
|
||||
|
||||
## Testing
|
||||
Storage driver test suites are provided in `storagedriver/testsuites/testsuites.go` and may be used for any storage driver written in go. Two methods are provided for registering test suites, `RegisterInProcessSuite` and `RegisterIPCSuite`, which run the same set of tests for the driver imported or managed over IPC respectively.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue