class NeededBlobs

Defined at line 164 of file fidling/gen/sdk/fidl/fuchsia.pkg/fuchsia.pkg/cpp/fidl/fuchsia.pkg/cpp/markers.h

Represents the transaction for caching a particular package.

Server expects client to follow the normal operation sequence defined below.

Violating the protocol (e.g. calling wrong methods at the wrong time) will result

in the channel being closed by the package cache with a `ZX_ERR_BAD_STATE` epitaph

and aborting the package cache operation.

If a fatal error occurs at any step, server will close the channel, and client

should not proceed with the sequence.

Non-fatal errors could be retried, as long as the channel remains open.

Normal operation sequence:

1. Clients should start by requesting to `OpenMetaBlob()`, and fetch and write

the metadata blob if needed, calling `BlobWritten()` when done to indicate the

write is complete.

2. `GetMissingBlobs()` should be used to determine which blobs need to be

fetched and written.

3. Each of the missing blobs needs to be written using `OpenBlob()` and

`BlobWritten()` should be called after each blob is written.

Clients are responsible for avoiding concurrent creation of the same blob if the underlying

blobstore does not support it. This currently manifests as the requirement that Clients close

the `BlobWriter` handle before retrying blob creation.

This applies per `BlobId` to all `BlobWriter`s returned by all calls to `Open[Meta]Blob` across

all `NeededBlobs` connections across all `PackageCache` connections.

Once all needed blobs are written by the client, the package cache will

complete the pending [`PackageCache.Get`] request and close this channel

with a `ZX_OK` epitaph.

Public Members

static Openness kOpenness

Records