Fetcher is an in-memory implementation of the blobserver Storage interface. It started as just a fetcher and grew. It also includes other convenience methods for testing.
| 29 | // interface. It started as just a fetcher and grew. It also includes |
| 30 | // other convenience methods for testing. |
| 31 | type Fetcher struct { |
| 32 | memory.Storage |
| 33 | |
| 34 | // ReceiveErr optionally returns the error to return on receive. |
| 35 | ReceiveErr error |
| 36 | |
| 37 | // FetchErr, if non-nil, specifies the error to return on the next fetch call. |
| 38 | // If it returns nil, fetches proceed as normal. |
| 39 | FetchErr func() error |
| 40 | } |
| 41 | |
| 42 | var ( |
| 43 | _ blobserver.Storage = (*Fetcher)(nil) |
nothing calls this directly
no outgoing calls
no test coverage detected