Setup
Registers the ActionsService handler on the SetupContext mux. This function requires sc.K8sClient and sc.Namespace to be set.
def Setup(
ctx: context.Context,
sc: *app.SetupContext
) - > error
Registers the ActionsService handler on the SetupContext mux. This function initializes OpenTelemetry providers and interceptors, sets up the Kubernetes client for actions, starts watching for TaskAction resources, and mounts the ActionsService handler to the provided multiplexer. It requires sc.K8sClient and sc.Namespace to be set.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the operation, used for cancellation and carrying request-scoped values. |
| sc | *app.SetupContext | The setup context containing necessary components like the Kubernetes client, cache, base URL, and the multiplexer to register the service handler. It must have K8sClient and Namespace initialized. |
Returns
| Type | Description |
|---|---|
error | An error if any step of the setup process fails, such as registering OpenTelemetry providers, initializing the Kubernetes scheme, creating the OpenTelemetry interceptor, or starting the TaskAction watcher. |