Documentation
¶
Index ¶
- Constants
- func DetectRuntime(bp *schema.Blueprint) (string, error)
- func DetectRuntimeFromProject(appDir string) (string, error)
- func DetectSDKVersion(appDir string, runtime string) (string, error)
- func LoadForDev(path string) (*schema.Blueprint, schema.SpecFormat, error)
- func ResolveRuntimeImage(runtime string, imageVersion string) (string, error)
- func ResourceKinds(bp *schema.Blueprint) []string
- func SQLEngines(bp *schema.Blueprint) []string
- type HandlerInfo
Constants ¶
const CoreRuntimeImageVersion = "0.3.0"
CoreRuntimeImageVersion is the core runtime image version an OS-only runtime resolves to.
Pinned in the CLI rather than detected from the project, because there is nothing in the project to detect. The core runtime carries no language SDK and versions independently of every SDK: the contract it has to stay compatible with is the IPC protocol, which is versioned in the proto package path. The SDK the handlers executable was built against travels inside the executable.
Variables ¶
This section is empty.
Functions ¶
func DetectRuntime ¶
DetectRuntime scans handler resources for the runtime field. Returns the runtime string (e.g. "nodejs24.x") or an error if no handlers exist or multiple different runtimes are found.
func DetectRuntimeFromProject ¶
DetectRuntimeFromProject infers the runtime from project files in appDir. This is a fallback for decorator-driven projects where the blueprint has no handler resources yet (they are created by the extraction step).
func DetectSDKVersion ¶
DetectSDKVersion reads the project's dependency file and returns the Celerity SDK version declared for the given runtime. The returned version is stripped of range prefixes (^, ~, >=, etc.) so it can be used directly as a Docker image tag component.
func LoadForDev ¶
LoadForDev loads a blueprint from a file path in parse-only mode (no provider/transformer validation). Returns the parsed blueprint and the detected format so the merger can serialize in the same format.
func ResolveRuntimeImage ¶
ResolveRuntimeImage maps a blueprint runtime identifier to a full Docker image reference. The image repo encodes the language and major version; the tag encodes the dev image minor series, so a project picks up runtime patch releases without editing a pin.
func ResourceKinds ¶
ResourceKinds returns the sorted, deduplicated resource kinds a blueprint declares.
A compiled language cannot discover these at startup the way an interpreted one can, so the build has to link an implementation for each kind ahead of time. Deriving them from the blueprint is what keeps that out of the application's own source.
func SQLEngines ¶
SQLEngines returns the sorted, deduplicated engines of a blueprint's SQL databases, so a driver is linked for each.
Types ¶
type HandlerInfo ¶
type HandlerInfo struct {
ResourceName string
HandlerName string
Method string
Path string
HandlerType string
CodeLocation string
Runtime string
}
HandlerInfo holds extracted metadata about a handler resource.
func CollectHandlerInfo ¶
func CollectHandlerInfo(bp *schema.Blueprint) []HandlerInfo
CollectHandlerInfo extracts handler metadata from the blueprint for display in startup output and state tracking.