Commit Graph

6 Commits

Author SHA1 Message Date
jiaxiao zhou 5c55e352de
cargo clippy
Signed-off-by: jiaxiao zhou <jiazho@microsoft.com>
2023-08-02 02:43:05 +00:00
Simon Mo 9bf2db776b Implement `list` for snapshotter request
This PR follows up on @wedsonaf's #126 and pass the filters through the list input.
Note that this is not backward compatible but this is a step closer to the protocol
conformance.
2023-04-21 18:39:32 +00:00
Wedson Almeida Filho f071faafc8 Implement `list` function
This is needed by remote snapshotters: once they report "already
exists", containerd tries to find the snapshot via `list`. If
it's not implemented, the "already exists" trick to prevent
layer download doesn't work.

This is still missing a filtering function, but allows remote
snapshotters to work.

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-03-14 23:59:29 -03:00
Wedson Almeida Filho 3aeeea0f55 Add `Into<tonic::Status>` bound to `Snapshotter::Error`
This allows implementers to express which grpc status should be
returned to clients on errors.

Prior to this patch, all errors got converted to "internal"
errors (`tonic::Status::internal`), which doesn't work when
specific status are needed. For example, remote snapshotters
need to return "already exists" to indicate that a layer
doesn't need to be downloaded.

Signed-off-by: Wedson Almeida Filho <walmeida@microsoft.com>
2023-01-19 16:18:05 -03:00
Maksym Pavlenko 5ddd3e37bb Run fmt
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2022-09-29 11:55:31 -07:00
Maksym Pavlenko e5d003c8bb Add snapshots example
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2021-12-18 10:39:28 -08:00