plugin

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 7 modules, 11 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

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