Documentation
¶
Overview ¶
Package embed compiles static @embed declarations to typed xfile.Ref values. It never puts asset bytes into Flow metadata or runtime state.
Index ¶
Constants ¶
View Source
const ( ID = "embed" DefaultProvider = "flow.static" DefaultMaxBytes = int64(16 << 20) )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver serves only assets declared during preprocessing. References are mapped through opaque IDs to validated relative paths and are integrity-checked on every open; bytes are bounded by maxBytes and are not retained.
func BundleWithFileResolver ¶
func BundleWithFileResolver(fsys fs.FS, provider string, maxBytes int64) (compiler.Bundle, *Resolver)
BundleWithFileResolver returns an embed bundle and its FS-backed resolver. The bundle registers the resolver so runner.BuildConfig composes it with other provider bindings automatically.
Click to show internal directories.
Click to hide internal directories.