example

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 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 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