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

frameworkadapter

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package frameworkadapter identifies adapters implemented by Foundry itself.

Feature boundaries isolate application adapters in an owned goroutine so a panic or runtime.Goexit cannot escape. Framework adapters never call runtime.Goexit, so their I/O can use the cheaper in-goroutine panic boundary. Application codecs, loaders and handlers always remain isolated.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(adapter any, operation string, fn func() error) error

Call runs adapter I/O under the cheapest boundary that still contains every failure the adapter can produce: Invoke for framework adapters, Isolated for application adapters. Both wait for the callback's actual exit.

func Is

func Is(adapter any) bool

Is reports whether adapter's concrete type is a framework-owned implementation. The marker alone is not enough: a type declared outside the framework (an application, plugin or external test package) that embeds a framework adapter inherits the method by promotion, yet its own overriding methods are application code, so it stays isolated. Only the concrete type's defining package is inspected; no value is copied or compared.

func IsFrameworkType

func IsFrameworkType(value any) bool

IsFrameworkType reports whether a concrete type is defined by the framework. It does not trust promoted methods or execute application code. Callers must separately establish the required method contract.

Types

type Owned

type Owned interface {
	FoundryAdapter(Seal)
}

Owned marks a framework adapter. The method has no behavior.

type Seal

type Seal struct {
	// contains filtered or unexported fields
}

Seal is a method-set marker, not a capability: FoundryAdapter is a pure no-op and is never invoked. Generic inference can implement Owned outside this module; Is therefore also checks the concrete type's defining package.

Jump to

Keyboard shortcuts

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