Skip to content

Implement fs.FS for backends and add helper #2

Open
@wojas

Description

@wojas

To allow streaming reading of larger blobs, implement the fs.FS interface in all backends.

For convenience, also provide a fallback implementation that simply uses the existing Interface to load the data.

To retrieve the FS interface for a backend, a program would call this convenience method:

// AsFS returns an fs.FS implementation for the given storage backend.
// If the storage backend implements fs.FS, that is returned. If it does not, a generic implementation
// that implements it using Interface is returned instead.
func AsFS(st Interface) fs.FS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions