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

plugin

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Socket listenType = iota
	Http
)
View Source
const Name = "PHPFPM"

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorMessage

type ErrorMessage struct {
	Message string `json:"message"`
}

type Options

type Options struct {
	plugin.SystemOptions `conf:"optional,name=System"`

	Timeout int `conf:"optional,range=1:30"`
}

Options is a plugin configuration

type Plugin

type Plugin struct {
	plugin.Base
	// contains filtered or unexported fields
}
var Impl Plugin

func (*Plugin) Configure

func (p *Plugin) Configure(global *plugin.GlobalOptions, options interface{})

Configure implements the Configurator interface. Initializes configuration structures.

func (*Plugin) Export

func (p *Plugin) Export(key string, rawParams []string, _ plugin.ContextProvider) (result interface{}, err error)

func (*Plugin) Validate

func (p *Plugin) Validate(options interface{}) error

Validate implements the Configurator interface. Returns an error if validation of a plugin's configuration is failed.

type Pool

type Pool struct {
	Name       string
	Listen     string
	ListenType listenType
	ConfigPath string
}

func (*Pool) GetStatus

func (p *Pool) GetStatus(timeout int) (*PoolStatus, error)

Function to get status of a pool

func (*Pool) Ping

func (p *Pool) Ping(timeout int) (int, error)

Function to ping a pool

type PoolDiscovery

type PoolDiscovery struct {
	Name       string     `json:"{#NAME}"`
	Listen     string     `json:"{#LISTEN}"`
	ListenType listenType `json:"{#LISTEN_TYPE}"`
	ConfigPath string     `json:"{#CONFIG_PATH}"`
}

type PoolStatus

type PoolStatus struct {
	Pool               string   `json:"pool"`
	ProcessManager     string   `json:"process manager"`
	StartTime          unixTime `json:"start time"`
	StartSince         int      `json:"start since"`
	AcceptedConn       int      `json:"accepted conn"`
	ListenQueue        int      `json:"listen queue"`
	MaxListenQueue     int      `json:"max listen queue"`
	ListenQueueLen     int      `json:"listen queue len"`
	IdleProcesses      int      `json:"idle processes"`
	ActiveProcesses    int      `json:"active processes"`
	TotalProcesses     int      `json:"total processes"`
	MaxActiveProcesses int      `json:"max active processes"`
	MaxChildrenReached int      `json:"max children reached"`
	SlowRequests       int      `json:"slow requests"`
}

Jump to

Keyboard shortcuts

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