NewActionsClient
Creates a new Kubernetes-based actions client. This function initializes the client with a Kubernetes client, shared cache, buffer size, number of workers, and a run client, optionally configuring a Bloom filter for record deduplication.
def NewActionsClient(
k8sClient: client.WithWatch,
sharedCache: ctrlcache.Cache,
bufferSize: int,
numWorkers: int,
runClient: workflowconnect.InternalRunServiceClient,
recordFilterSize: int,
scope: promutils.Scope
) - > *ActionsClient
Creates a new Kubernetes-based actions client. This client is used to manage and interact with actions within a Kubernetes environment.
Parameters
| Name | Type | Description |
|---|---|---|
| k8sClient | client.WithWatch | The Kubernetes client with watch capabilities, used for interacting with the Kubernetes API. |
| sharedCache | ctrlcache.Cache | A shared cache for Kubernetes objects, used to reduce direct API calls and improve performance. |
| bufferSize | int | The size of the buffer for action updates, controlling how many updates can be queued before processing. |
| numWorkers | int | The number of worker goroutines to process action updates. If set to 0 or less, it defaults to 1. |
| runClient | workflowconnect.InternalRunServiceClient | The client for internal run services, used to communicate with workflow execution components. |
| recordFilterSize | int | The size for the record filter, used to deduplicate action records. If greater than 0, a Bloom filter is initialized for deduplication. |
| scope | promutils.Scope | The Prometheus metrics scope for reporting metrics related to the actions client. |
Returns
| Type | Description |
|---|---|
*ActionsClient | A new instance of the ActionsClient configured with the provided parameters. |