plugin_entrypoint

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = semver.MustParse("0.0.1")

Version is the entrypoint version

Functions

func BuildPluginAssetsFSController

func BuildPluginAssetsFSController(le *logrus.Entry, b bus.Bus, pluginHostClient srpc.Client, pluginID string) *unixfs_access.Controller

BuildPluginAssetsFSController builds a unixfs_access controller for the plugin assets.

func BuildPluginDistFSController

func BuildPluginDistFSController(le *logrus.Entry, b bus.Bus, pluginHostClient srpc.Client, pluginID string) *unixfs_access.Controller

BuildPluginDistFSController builds a unixfs_access controller for the plugin dist fs.

func ExecutePluginEntrypoint

func ExecutePluginEntrypoint(
	rctx context.Context,
	le *logrus.Entry,
	meta *bldr_plugin.PluginMeta,
	addFactoryFuncs []AddFactoryFunc,
	configSetFuncs []BuildConfigSetFunc,
	pluginHostClient srpc.Client,
	acceptPluginHostStreams func(ctx context.Context, srv *srpc.Server) error,
) error

ExecutePluginEntrypoint builds the bus & starts common controllers.

func Main

func Main(
	pluginStartInfoJsonB64,
	pluginMetaB58 string,
	logLevel logrus.Level,
	addFactoryFuncs []AddFactoryFunc,
	configSetFuncs []BuildConfigSetFunc,
)

Main runs the default main entrypoint for a plugin.

func PluginDevInfoFromFile

func PluginDevInfoFromFile(filePath string) (*vardef.PluginDevInfo, error)

PluginDevInfoFromFile loads a PluginDevInfo object from a .bin file.

func Run

func Run(
	ctx context.Context,
	le *logrus.Entry,
	pluginStartInfo *bldr_plugin.PluginStartInfo,
	pluginMeta *bldr_plugin.PluginMeta,
	addFactoryFuncs []AddFactoryFunc,
	configSetFuncs []BuildConfigSetFunc,
) error

Run runs the plugin entrypoint.

func UnmarshalPluginMeta

func UnmarshalPluginMeta(pluginMetaB58 string) (*bldr_plugin.PluginMeta, error)

UnmarshalPluginMeta unmarshals the plugin meta information.

func UnmarshalPluginStartInfo

func UnmarshalPluginStartInfo(pluginStartInfoJsonB64 string) (*bldr_plugin.PluginStartInfo, error)

UnmarshalPluginStartInfo unmarshals the plugin start information.

Types

type AddFactoryFunc

type AddFactoryFunc func(b bus.Bus) []controller.Factory

AddFactoryFunc is a callback to add a factory.

type BuildConfigSetFunc

type BuildConfigSetFunc func(ctx context.Context, b bus.Bus, le *logrus.Entry) ([]configset.ConfigSet, error)

BuildConfigSetFunc is a function to build a list of ConfigSet to apply.

func ConfigSetFuncFromFS

func ConfigSetFuncFromFS(ifs fs.FS, fileName string) BuildConfigSetFunc

ConfigSetFuncFromFS builds a ConfigSetFunc which parses a file in a FS as a ConfigSet.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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