plugins

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDuDuHandlerFunc

func GetDuDuHandlerFunc(p PigPigPlugins) dudu.HandlerFunc

GetDuDuHandlerFunc compose to dudu.HandlerFUnc.

Types

type PigPigPlugins

type PigPigPlugins interface {

	// ModifyRequest is an optional function that modifies the
	// request before send to the remote.
	ModifyRequest(c *dudu.RequestDetail)

	// ModifyResponse is an optional function that modifies the
	// Response from the remote. It is called if the remote
	// returns a response at all, with any HTTP status code.
	// If the backend is unreachable, the optional ErrorHandler is
	// called without any call to ModifyResponse.
	ModifyResponse(c *dudu.RequestDetail, r *dudu.ResponseDetail)

	// ModifyError is an optional function if the remote is unreachable then call modify error
	ModifyError(c *dudu.RequestDetail, errors []error)
}

PigPigPlugins plugin of the PigPig server interface.

type PluginsOptions

type PluginsOptions struct {
	Plugins dudu.HandlersChain
	// contains filtered or unexported fields
}

PluginsOptions ...

func NewPluginsOptions

func NewPluginsOptions(path []string) *PluginsOptions

NewPluginsOptions returns new plugin.md options.

func (*PluginsOptions) LoadPlugins

func (o *PluginsOptions) LoadPlugins()

LoadPlugins load plugin.md.

Jump to

Keyboard shortcuts

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