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

pluginabi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	PluginName
	Init(PluginManager) error
	Start()
	Pause()
}

type PluginManager

type PluginManager interface {
	Printf(scope string, format string, a ...any) (n int, err error)
	Println(scope string, a ...any) (n int, err error)
	RegisterLogProcesser(context PluginName, process func(logmsg string, iscommandrespone bool)) (channel chan *manager.MessageResponse)
	RegisterManagerMessageChannel(skipRegister bool) (channel chan *manager.MessageResponse)
	RegisterPlugin(plugin Plugin) (p Plugin, err error)
	GetPlugin(pluginName string) Plugin
	UnRegisterManagerMessageChannel(channel chan *manager.MessageResponse)

	RunCommand(cmd string) string

	Status(opts ...grpc.CallOption) (*manager.StatusResponse, error)
	Stop(opts ...grpc.CallOption) (*emptypb.Empty, error)
	StartMinecraft() (err error)
}

type PluginName

type PluginName interface {
	Name() string
	DisplayName() string
}

type PluginNameWrapper

type PluginNameWrapper struct {
	PluginName        string
	PluginDisplayName string
}

func (*PluginNameWrapper) DisplayName

func (p *PluginNameWrapper) DisplayName() string

func (*PluginNameWrapper) Name

func (p *PluginNameWrapper) Name() string

Source Files

  • plugin.go

Jump to

Keyboard shortcuts

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