feat(phase-1.2): temporal SDK client, worker mgmt, k8s deployments
CI / CI (pull_request) Successful in 4m32s
CI / CI (pull_request) Successful in 4m32s
- internal/temporal/client.go: robust client with retry + TLS + health check - internal/temporal/worker.go: worker creation, registration, lifecycle - internal/temporal/context.go: timeout helpers - k8s/worker-deployment.yaml: 2-10 replica HPA, health probes, security context - k8s/workflow-runner-deployment.yaml: singleton runner with probes - k8s/kustomization.yaml: updated resource list, removed missing ref Tests: 11 pass (client_test.go + worker_test.go) Build: go build ./... clean Kustomize: dry-run validated
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package temporal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ContextWithTimeout creates a context with the given timeout.
|
||||
func ContextWithTimeout(timeout time.Duration) (context.Context, context.CancelFunc) {
|
||||
return context.WithTimeout(context.Background(), timeout)
|
||||
}
|
||||
|
||||
// ContextWithDefault creates a context with a default timeout of 10 seconds.
|
||||
func ContextWithDefault() (context.Context, context.CancelFunc) {
|
||||
return context.WithTimeout(context.Background(), 10*time.Second)
|
||||
}
|
||||
Reference in New Issue
Block a user