In previous versions, we had a behavior module called FileStore.Adapter. Each adapter would implement this behavior. The top-level FileStore module existed in order to delegate to the appropriate adapter based on the provided configuration. All of the functions defined in the behavior had to be repeated in the FileStore module.
FileStore is now a protocol, and each adapter implements the protocol. This helps to avoid repetitive declaration of functions. It also means that each adapter's implementation is private and won't be called directly.
Breaking Changes
FileStore.new(adapter: Adapter, ...config) is now Adapter.new(config)
If you were previously calling any of the undocumented functions defined in the adapter itself, those are gone now and you won't be able to call them.
In previous versions, we had a behavior module called
FileStore.Adapter
. Each adapter would implement this behavior. The top-levelFileStore
module existed in order to delegate to the appropriate adapter based on the provided configuration. All of the functions defined in the behavior had to be repeated in theFileStore
module.FileStore
is now a protocol, and each adapter implements the protocol. This helps to avoid repetitive declaration of functions. It also means that each adapter's implementation is private and won't be called directly.Breaking Changes
FileStore.new(adapter: Adapter, ...config)
is nowAdapter.new(config)
FileStore
is no longer a struct.Before
After