backend

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package backend runs plugin guests built as C shared libraries (lib/plugin/include/ext_plugin_guest.h), including Go -buildmode=c-shared guests, as a plugin backend. cengine/cguest loads the library and exchanges bytes; this package speaks the plugin protocol over it: ext.io.pc/v1 frames, the frame limit and default deadline, the descriptor and response checks, and the engine's errors. Native code executes inside the host and cannot be forcibly stopped.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Profile

func Profile() plugin.BackendProfile

func Supported

func Supported() bool

Supported reports whether this build can load a C ABI guest at all.

Types

type Backend

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

Backend is one C ABI guest as a plugin.Backend.

func Open

func Open(ctx context.Context, path string) (*Backend, error)

Open loads an absolute verified library path, checks ABI v1 and creates an independent guest handle, within plugin.DefaultTimeout. Use inside plugin.Options.Connect. Library images remain resident for process lifetime, even after errors; use immutable revision-specific artifact paths.

func (*Backend) Close

func (b *Backend) Close() error

Close stops admission and releases waiting callers immediately. Native cleanup runs after an outstanding call returns. It never unloads the image.

func (*Backend) Handshake

func (b *Backend) Handshake(ctx context.Context) (plugin.Descriptor, error)

func (*Backend) Invoke

func (b *Backend) Invoke(ctx context.Context, req plugin.Request) (plugin.Response, error)

func (*Backend) WaitClosed

func (b *Backend) WaitClosed(ctx context.Context) error

WaitClosed waits for actual guest resource cleanup after Close.

Jump to

Keyboard shortcuts

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