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

extensiblePlugin

package
v1.5.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CLEPreEvent    = "CalloopE PreEvent"
	CLEInPreEvent  = "CalloopE InPreEvent"
	CLEInPostEvent = "CalloopE InPostEvent"
	CLEPostEvent   = "CalloopE PostEvent"
)

Сalloop events

View Source
const (
	CLEScopeData = "ExtensiblePlugin ScopeData CalloopE Data" // Сalloop data (CLEData)
)
View Source
const (
	ECLFlag = "ExtensiblePlugin" // This flag will be added to plugins manager when the plugin is initialized
)
View Source
const Name = "extensible call loop"

Variables

This section is empty.

Functions

This section is empty.

Types

type CLEData

type CLEData[I, P, E any] struct {
	Input  I
	Idx    *int
	Parsed []P
	PLen   int
	Ctx    context.Context
	E      E
}

type ExtensibleCLPlugin

type ExtensibleCLPlugin struct {
	Eu     *lc.EngineUniversal
	Events core.EventsInterface
	ETools core.EventsTools
	WasE   core.EventType
	// contains filtered or unexported fields
}

ExtensibleCLPlugin

Replace standart calloops and add calloops with event hooks. System plugin.

func New added in v1.5.2

func (*ExtensibleCLPlugin) ByteCallHotLoopEvent

func (ep *ExtensibleCLPlugin) ByteCallHotLoopEvent(ev *core.Events, i *core.EventInput) (err core.ErrorInterface)

ByteCallHotLoopEvent is the main loop for bytecode execution. It wraps the standard byte‑call loop with pre‑ and post‑iteration hooks.

Err errors.ExtensiblePluginError:

  • If the input is not of type ByteCLDType. Meta: EMK(0, "string") – the actual type (if available).
  • If core.ScopeGet fails to retrieve BCLEData.
  • If ByteCallEventIteration fails.
  • Meta: EMK(0, "int") – bytecode index where the error occurred.

func (*ExtensibleCLPlugin) Call added in v1.5.2

func (ep *ExtensibleCLPlugin) Call(string, ...core.Option) (o any, e error)

func (*ExtensibleCLPlugin) Close added in v1.5.2

func (ep *ExtensibleCLPlugin) Close() error

func (*ExtensibleCLPlugin) Init

func (*ExtensibleCLPlugin) Name

func (ep *ExtensibleCLPlugin) Name() string

func (*ExtensibleCLPlugin) Run added in v1.5.2

func (ep *ExtensibleCLPlugin) Run(input any) (o any, e error)

func (*ExtensibleCLPlugin) StringCallLoopEvent

func (ep *ExtensibleCLPlugin) StringCallLoopEvent(ev *core.Events, i *core.EventInput) (err core.ErrorInterface)

StringCallLoopEvent is the main loop for string-based command execution. It wraps the standard events with pre‑ and post‑iteration hooks.

Err errors.ExtensiblePluginError:

  • If core.ScopeGet fails to retrieve SCLEData.
  • If StringCallEventIteration fails.
  • Meta: EMK(0, "string") – the raw line that caused the error (if available).

Jump to

Keyboard shortcuts

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