Fetcher is the minimal interface for retrieving a blob from storage. The full storage interface is blobserver.Storage.
| 33 | // Fetcher is the minimal interface for retrieving a blob from storage. |
| 34 | // The full storage interface is blobserver.Storage. |
| 35 | type Fetcher interface { |
| 36 | // Fetch returns a blob. If the blob is not found then |
| 37 | // os.ErrNotExist should be returned for the error (not a wrapped |
| 38 | // error with a ErrNotExist inside) |
| 39 | // |
| 40 | // The contents are not guaranteed to match the digest of the |
| 41 | // provided Ref (e.g. when streamed over HTTP). Paranoid |
| 42 | // callers should verify them. |
| 43 | // |
| 44 | // The caller must close blob. |
| 45 | // |
| 46 | // The provided context is used until blob is closed and its |
| 47 | // cancellation should but may not necessarily cause reads from |
| 48 | // blob to fail with an error. |
| 49 | Fetch(context.Context, Ref) (blob io.ReadCloser, size uint32, err error) |
| 50 | } |
| 51 | |
| 52 | // ErrUnimplemented is returned by optional interfaces when their |
| 53 | // wrapped values don't implemented the optional interface. |
no outgoing calls
no test coverage detected