plugin

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: AGPL-3.0 Imports: 5 Imported by: 10

Documentation

Index

Constants

View Source
const (
	// Run command hooks.
	OnConfigLoaded string = "onConfigLoaded"
	OnNewLogger    string = "onNewLogger"
	OnNewPool      string = "onNewPool"
	OnNewClient    string = "onNewClient"
	OnNewProxy     string = "onNewProxy"
	OnNewServer    string = "onNewServer"
	OnSignal       string = "onSignal"
	// Server hooks.
	OnRun      string = "onRun"
	OnBooting  string = "onBooting"
	OnBooted   string = "onBooted"
	OnOpening  string = "onOpening"
	OnOpened   string = "onOpened"
	OnClosing  string = "onClosing"
	OnClosed   string = "onClosed"
	OnTraffic  string = "onTraffic"
	OnShutdown string = "onShutdown"
	OnTick     string = "onTick"
	// Proxy hooks.
	OnTrafficFromClient string = "onTrafficFromClient"
	OnTrafficToServer   string = "onTrafficToServer"
	OnTrafficFromServer string = "onTrafficFromServer"
	OnTrafficToClient   string = "onTrafficToClient"
)

Variables

This section is empty.

Functions

func GetAttr added in v0.0.6

func GetAttr(req *structpb.Struct, key string, defaultValue interface{}) interface{}

Types

type Identifier

type Identifier struct {
	Name      string
	Version   string
	RemoteURL string
	Checksum  string
}

type Method

type Plugin

type Plugin struct {
	goplugin.NetRPCUnsupportedPlugin
	pluginV1.GatewayDPluginServiceServer

	Client *goplugin.Client

	ID          Identifier
	Description string
	Authors     []string
	License     string
	ProjectURL  string
	LocalPath   string
	Args        []string
	Env         []string
	Enabled     bool
	// internal and external config options
	Config map[string]string
	// hooks it attaches to
	Hooks    []string
	Priority Priority
	// required plugins to be loaded before this one
	// Built-in plugins are always loaded first
	Requires   []Identifier
	Tags       []string
	Categories []string
}

type Priority

type Priority uint

Priority is the priority of a hook. Smaller values are executed first (higher priority).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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