{"modulePath":"github.com/LeanerCloud/cloud-commitments-platform","version":"v0.0.0-20261202160902-a99bcb5bfea3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package runtime\n\nPackage runtime holds small helpers that inspect the process's runtime environment. Kept deliberately minimal — this is a shared surface, not a grab-bag for utility code.\n\n## Functions\n\n```go\nfunc IsLambda() bool\n```\nIsLambda reports whether the current process is running inside an AWS Lambda execution environment. Detection is based on AWS\\_LAMBDA\\_RUNTIME\\_API, which the Lambda service sets for every function, zip or container image alike (the runtime interface client in a Lambda container image needs it). It is absent on non-Lambda deployments: local dev runs and the long-running servers (Fargate, Cloud Run, Container Apps).\n\nThe flag answers one question only: is the process frozen between invocations, so that background goroutines (e.g. the stale-while-revalidate refresh) cannot be relied on to finish? It says nothing about whether the deployment runs a single instance or many, so do not use it to decide whether process-local state is shared across requests.\n\nCallers asking the freeze question should use this helper rather than reading the env var directly so the detection rule stays consistent across call sites.\n\n","path":"github.com/LeanerCloud/cloud-commitments-platform/internal/runtime","name":"runtime","synopsis":"Package runtime holds small helpers that inspect the process's runtime environment.","isRedistributable":true}
