example

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package example provides example plugin implementations for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelloPlugin

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

HelloPlugin is a simple example plugin that demonstrates the plugin interface. This is a native Go implementation for testing - real plugins would be WASM or gRPC.

func NewHelloPlugin

func NewHelloPlugin() *HelloPlugin

NewHelloPlugin creates a new hello plugin instance.

func (*HelloPlugin) Call

func (p *HelloPlugin) Call(ctx context.Context, fn string, args json.RawMessage) (json.RawMessage, error)

Call implements plugin.Plugin.

func (*HelloPlugin) GKRegister

func (p *HelloPlugin) GKRegister() plugin.GKRegistration

Manifest implements plugin.Plugin.

func (*HelloPlugin) Init

func (p *HelloPlugin) Init(ctx context.Context, host plugin.HostAPI) error

Init implements plugin.Plugin.

func (*HelloPlugin) Shutdown

func (p *HelloPlugin) Shutdown(ctx context.Context) error

Shutdown implements plugin.Plugin.

Jump to

Keyboard shortcuts

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