Files
sless/examples/hello-go/job.tf
T
“Naeel” a709b38f6b feat: go1.23 runtime support
- runtimes/go1.23/server.go: HTTP-wrapper + job-runner (SLESS_MODE=job)
- runtimes/go1.23/go.mod: module sless/fn (изолирует от корневого go.mod)
- runtimes/go1.23/Dockerfile: multi-stage build (golang:1.23-alpine → alpine:3.20)
- internal/builder/context.go: go1.23 в runtimeBaseImage + generateDockerfile
- controllers/functionjob_controller.go: go1.23 runner (nil cmd + SLESS_MODE=job env)
- api/v1alpha1/function_types.go: enum go1.21 → go1.23
- config/crd/bases/...: CRD обновлён
- terraform/provider: OneOf обновлён
- examples/hello-go: HTTP + job примеры на go1.23
- deployments/k8s/operator.yaml: v0.1.25
2026-03-11 15:40:47 +04:00

29 lines
668 B
Terraform
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 2026-03-11
# job.tf — одноразовый запуск Go функции с event payload.
resource "sless_function" "hello_go_job" {
name = "hello-go-job"
runtime = "go1.23"
entrypoint = "handler.Handle"
memory_mb = 128
timeout_sec = 60
source_dir = "${path.module}/code"
}
resource "sless_job" "hello_go_run" {
name = "hello-go-run"
function = sless_function.hello_go_job.name
event_json = jsonencode({ name = "Go" })
wait_timeout_sec = 300
run_id = 1
}
output "job_phase" {
value = sless_job.hello_go_run.phase
}
output "job_message" {
value = sless_job.hello_go_run.message
}