buildgrid.server.client.actioncache module
- class buildgrid.server.client.actioncache.ActionCacheClient(channel: Channel, retries: int = 0, max_backoff: int = 64, should_backoff: bool = True)
Bases:
object
Remote ActionCache service client helper.
The
ActionCacheClient
class comes with a generator factory function that can be used together with the with statement for context management:from buildgrid.server.client.actioncache import query with query(channel, instance='build') as action_cache: digest, action_result = action_cache.get(action_digest)
- get(instance_name: str | None, action_digest: Digest) ActionResult | None
Attempt to retrieve cached
ActionResult
for : given obj:Action.
- update(instance_name: str | None, action_digest: Digest, action_result: ActionResult) ActionResult | None
Attempt to map in cache an
Action
to anActionResult
.
- close() None
Closes the underlying connection stubs.
- buildgrid.server.client.actioncache.query(channel: Channel, retries: int = 0, max_backoff: int = 64, should_backoff: bool = True) Iterator[ActionCacheClient]
Context manager generator for the
ActionCacheClient
class.