Table of Contents

Class CloudRunIdPlugin

Namespace
Temporalio.Extensions.Gcp.CloudRun.Id
Assembly
Temporalio.Extensions.Gcp.CloudRun.Id.dll

Temporal client and worker plugin that derives the client identity from Google Cloud Run instance metadata, on both Cloud Run worker pools and services.

public class CloudRunIdPlugin : SimplePlugin, ITemporalClientPlugin, ITemporalWorkerPlugin
Inheritance
CloudRunIdPlugin
Implements
Inherited Members

Remarks

Register a single instance on Plugins. At connect time it fetches the Cloud Run metadata once (caching it) and, unless an identity was already configured, sets Identity to the Cloud Run worker identity, so an explicitly configured identity always wins. Workers created from the connected client inherit that identity.

The metadata fetch throws an InvalidOperationException at connect time when the process is not running on a Cloud Run worker pool or service.

WARNING: Google Cloud Run support is experimental.

Constructors

CloudRunIdPlugin()

Initializes a new instance of the CloudRunIdPlugin class using the default Cloud Run metadata server URI and timeout.

public CloudRunIdPlugin()

Methods

ConnectAsync(TemporalClientConnectOptions, Func<TemporalClientConnectOptions, Task<TemporalConnection>>)

Handles temporal connection asynchronously.

public override Task<TemporalConnection> ConnectAsync(TemporalClientConnectOptions options, Func<TemporalClientConnectOptions, Task<TemporalConnection>> continuation)

Parameters

options TemporalClientConnectOptions

The connection options.

continuation Func<TemporalClientConnectOptions, Task<TemporalConnection>>

The continuation function.

Returns

Task<TemporalConnection>

A task representing the asynchronous operation.