Documentation
¶
Overview ¶
Package nativego loads trusted Go shared objects built with -buildmode=plugin. Host and guest must use matching Go toolchains, flags and shared dependencies. Loading runs package initializers. Images remain loaded for the host lifetime.
Index ¶
Constants ¶
const Symbol = "ExtPlugin"
Symbol is the required exported function name. The guest declares:
func ExtPlugin(context.Context) (plugin.Backend, error)
Each call must create an independent backend. Its Close releases resources; it cannot unload code. The factory context bounds startup, not guest lifetime.
Variables ¶
This section is empty.
Functions ¶
func Profile ¶
func Profile() plugin.BackendProfile
Types ¶
type Backend ¶
func Open ¶
Open loads an absolute, host-verified path and calls its exported factory. Use inside plugin.Options.Connect so verification precedes code execution. Go's loader and package initializers cannot be interrupted; factories and handlers must cooperate with context cancellation. Close must return promptly.