Setup
Registers Run and Task service handlers on the SetupContext mux. Requires sc.DB and sc.DataStore to be set. When sc.K8sConfig is provided, RunLogsService is also mounted to enable pod log streaming.
def Setup(
ctx: context.Context,
sc: *app.SetupContext
) - > error
Registers Run and Task service handlers on the SetupContext mux. Requires sc.DB and sc.DataStore to be set. When sc.K8sConfig is provided, RunLogsService is also mounted to enable pod log streaming.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The context for the setup operations, used for cancellation and carrying request-scoped values. |
| sc | *app.SetupContext | The setup context containing necessary dependencies like the database connection (sc.DB), data store (sc.DataStore), Kubernetes configuration (sc.K8sConfig), and the HTTP multiplexer (sc.Mux) for handler registration. |
Returns
| Type | Description |
|---|---|
error | An error if any setup step fails, such as migrations, OTel provider registration, repository creation, or Kubernetes log streamer creation. |