Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Storage Context with Driver-Agnostic Design (Local File Storage as Initial Implementation) #29

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

iammuho
Copy link
Owner

@iammuho iammuho commented Sep 1, 2023

Related issue: #19

This PR lays the foundation for a driver-agnostic storage subsystem in NatterNet by introducing StorageContext and DriverContext interfaces. The design allows for seamless extension with various storage drivers in the future.

Changes:
New Interfaces:

  • DriverContext defines methods that any storage driver must implement (Get, Put, Delete, List).
  • StorageContext serves as the entry point for the storage subsystem and delegates operations to the underlying driver.

File Storage Driver:

  • As an initial implementation, a local file storage driver is added.
  • Implements the DriverContext interface and contains methods to manage local files (Get, Put, Delete, List).

Factory Method:

  • NewStorage factory method to create a new StorageContext instance.
  • Currently supports only local file storage; can be easily extended to include other drivers.

@iammuho iammuho added the enhancement New feature or request label Sep 1, 2023
@iammuho iammuho merged commit 9cb16bd into main Sep 1, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant