Documentation
¶
Index ¶
- Constants
- func BoundedWASMStdin(input json.RawMessage) *bytes.Reader
- func ProductCaptureBrowserContract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
- func ProductCaptureCommand() []string
- func SHA256Ref(data []byte) string
- func WASMComponentContract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
- func WASMMemoryLimitPages(memoryBytes int64) uint32
- func WriteStrictJSON(path string, value any) error
- type ProductCaptureBrowserInvocationOptions
- type ProductCaptureBrowserRuntime
- type ProductCaptureBrowserRuntimeInvocation
- type ProductCaptureProviderRequest
- type RuntimeAdapterCatalogDocument
- type RuntimeAdapterCatalogEntry
- type SandboxRuntimeProductCaptureBrowserAdapter
- type WASMInvocationOptions
- type WASMRunRequest
- type WASMRunResult
- type WASMRuntime
- type WazeroRuntime
Constants ¶
View Source
const ( WASMComponentProviderName = "wasm-component" WASMComponentOperationRun = "run-wasm-component" ProductCaptureBrowserProviderName = "product-capture-browser" ProductCaptureBrowserOperationCapture = "capture-product-browser" ProductCaptureProviderBinaryPath = "provider/product-capture-provider" ProductCaptureRequestPath = "request.json" ProductCaptureSnapshotPath = "snapshot.json" DefaultWASMABI = "wasm-export-i32-v1" )
Variables ¶
This section is empty.
Functions ¶
func BoundedWASMStdin ¶
func BoundedWASMStdin(input json.RawMessage) *bytes.Reader
func ProductCaptureBrowserContract ¶
func ProductCaptureBrowserContract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
func ProductCaptureCommand ¶
func ProductCaptureCommand() []string
func WASMComponentContract ¶
func WASMComponentContract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
func WASMMemoryLimitPages ¶
func WriteStrictJSON ¶
Types ¶
type ProductCaptureBrowserRuntime ¶
type ProductCaptureBrowserRuntime interface {
RunProductCaptureBrowser(context.Context, ProductCaptureBrowserRuntimeInvocation) (core.RuntimeExecutionResult, error)
}
type ProductCaptureBrowserRuntimeInvocation ¶
type ProductCaptureBrowserRuntimeInvocation struct {
Request core.RuntimeExecutionRequest
Image string
Workspace string
Network string
Timeout time.Duration
}
func NewProductCaptureBrowserInvocation ¶
func NewProductCaptureBrowserInvocation(opts ProductCaptureBrowserInvocationOptions) (ProductCaptureBrowserRuntimeInvocation, error)
type ProductCaptureProviderRequest ¶
type ProductCaptureProviderRequest struct {
Workload core.ProductCaptureWorkload `json:"workload"`
}
type RuntimeAdapterCatalogDocument ¶
type RuntimeAdapterCatalogDocument struct {
Version string `json:"version"`
ProtocolVersion string `json:"protocol_version"`
Adapters []RuntimeAdapterCatalogEntry `json:"adapters"`
HostOwnedResponsibilities []string `json:"host_owned_responsibilities"`
}
func (RuntimeAdapterCatalogDocument) Validate ¶
func (d RuntimeAdapterCatalogDocument) Validate() error
type RuntimeAdapterCatalogEntry ¶
type RuntimeAdapterCatalogEntry struct {
AdapterID string `json:"adapter_id"`
Operation string `json:"operation"`
Kinds []core.RuntimeAdapterKind `json:"kinds"`
WorkloadKinds []core.WorkloadKind `json:"workload_kinds"`
RuntimeProfiles []core.RuntimeProfile `json:"runtime_profiles"`
WorkspacePolicy core.RuntimeWorkspacePolicy `json:"workspace_policy"`
ConformanceProfiles []string `json:"conformance_profiles"`
}
func (RuntimeAdapterCatalogEntry) Contract ¶
func (e RuntimeAdapterCatalogEntry) Contract(descriptor core.RuntimeDescriptor) core.RuntimeAdapterContract
func (RuntimeAdapterCatalogEntry) Validate ¶
func (e RuntimeAdapterCatalogEntry) Validate() error
type SandboxRuntimeProductCaptureBrowserAdapter ¶
type SandboxRuntimeProductCaptureBrowserAdapter struct {
Runtime computecontainer.SandboxRuntime
}
func (SandboxRuntimeProductCaptureBrowserAdapter) RunProductCaptureBrowser ¶
func (a SandboxRuntimeProductCaptureBrowserAdapter) RunProductCaptureBrowser(ctx context.Context, invocation ProductCaptureBrowserRuntimeInvocation) (core.RuntimeExecutionResult, error)
type WASMInvocationOptions ¶
type WASMInvocationOptions struct {
TaskID string
LeaseID string
Kind core.WorkloadKind
WASM *core.WASMWorkload
Provider *core.ProviderWorkload
Limits core.ResourceLimits
}
type WASMRunRequest ¶
type WASMRunRequest struct {
ProtocolVersion string `json:"protocol_version"`
TaskID string `json:"task_id"`
LeaseID string `json:"lease_id"`
ProviderConfig core.ProviderConfig `json:"provider_config,omitzero"`
ComponentRef string `json:"component_ref"`
ComponentDigest string `json:"component_digest"`
ABI string `json:"abi"`
Operation string `json:"operation"`
Input json.RawMessage `json:"input"`
Component []byte `json:"-"`
Workspace string `json:"-"`
Limits core.ResourceLimits `json:"-"`
}
func NewWASMRunRequest ¶
func NewWASMRunRequest(opts WASMInvocationOptions) (WASMRunRequest, error)
func (WASMRunRequest) Validate ¶
func (r WASMRunRequest) Validate() error
type WASMRunResult ¶
type WASMRunResult = core.RuntimeExecutionResult
type WASMRuntime ¶
type WASMRuntime interface {
RunWASM(context.Context, WASMRunRequest) (WASMRunResult, error)
}
type WazeroRuntime ¶
type WazeroRuntime struct{}
func (WazeroRuntime) RunWASM ¶
func (WazeroRuntime) RunWASM(ctx context.Context, req WASMRunRequest) (WASMRunResult, error)
Click to show internal directories.
Click to hide internal directories.