Help us shape the future of Go! Take the 2026 Go Developer Survey

blueprint

package
v0.0.0-...-2fd5d2c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
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

func DetectRuntime(bp *schema.Blueprint) (string, error)

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

func DetectRuntimeFromProject(appDir string) (string, error)

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

func DetectSDKVersion(appDir string, runtime string) (string, error)

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

func LoadForDev(path string) (*schema.Blueprint, schema.SpecFormat, error)

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

func ResolveRuntimeImage(runtime string, imageVersion string) (string, error)

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

func ResourceKinds(bp *schema.Blueprint) []string

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

func SQLEngines(bp *schema.Blueprint) []string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL