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

plugin

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugins = map[string]*Plugin{}

Plugins 已加载插件

Functions

func KillAll

func KillAll()

KillAll kill all loaded plugins

func Select

func Select(id string) (grpc.Model, error)

Select a plugin

func SetPluginLogger

func SetPluginLogger(name string, output io.Writer, level hclog.Level)

SetPluginLogger 设置日志

Types

type Plugin

type Plugin struct {
	Client *plugin.Client
	Model  grpc.Model
	ID     string
	File   string
}

Plugin 插件

func Load

func Load(file string, id string) (*Plugin, error)

Load a plugin

func (*Plugin) Kill

func (plugin *Plugin) Kill()

Kill a plugin process

Jump to

Keyboard shortcuts

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