Documentation
¶
Index ¶
- func ResolveSymbol[T any](symbol any) (T, bool)
- func ValidateRepositoryURL(raw string) error
- type BuildSpec
- type Loader
- func (l *Loader[T]) CompileAndLoad(name, repoURL, gitRef, commitHash string) (T, string, error)
- func (l *Loader[T]) LoadCached(name string) (T, error)
- func (l *Loader[T]) LoadPath(name, artifactPath string) (T, error)
- func (l *Loader[T]) MetaPath(name string) string
- func (l *Loader[T]) SoPath(name string) string
- type Registry
- type SymbolResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveSymbol ¶
ResolveSymbol accepts either a direct implementation or a pointer to one.
func ValidateRepositoryURL ¶
ValidateRepositoryURL rejects local filesystem paths and unsupported URL schemes before the runtime invokes git. HTTPS and SSH-style Git URLs are allowed.
Types ¶
type BuildSpec ¶
type BuildSpec[T any] struct { LogPrefix string AppDir string CacheDir string TempDir string HostPackageDir string ClonePrefix string SymbolName string DefaultGitRef string BuildTimeout time.Duration Resolver SymbolResolver[T] }
BuildSpec describes how a runtime extension should be cloned, compiled, cached, and opened inside the host module.
type Loader ¶
type Loader[T any] struct { // contains filtered or unexported fields }
Loader compiles and loads runtime extensions using a shared clone/build/cache/open flow.
func (*Loader[T]) CompileAndLoad ¶
CompileAndLoad clones repoURL, compiles the extension, caches the .so by commit, and loads it. Builds for the same logical plugin are serialized across goroutines and cooperating processes to avoid cache and source directory races.
func (*Loader[T]) LoadCached ¶
LoadCached loads a previously compiled extension from the shared cache.
type Registry ¶
type Registry[T any] struct { // contains filtered or unexported fields }
Registry is a threadsafe named registry for runtime extensions.
type SymbolResolver ¶
SymbolResolver converts a looked-up plugin symbol into the requested runtime type.