Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Plugin ¶
type Plugin struct { Name string `json:"name"` Address string `json:"address"` Methods []string `json:"methods"` }
Plugin provides cancelable rpc server used to run custom plugins
func (*Plugin) Do ¶
Do register the plugin, send info to reproxy conductor and activate RPC listener. On completion unregister from reproxy. Blocking call, should run in goroutine on the caller side rvcr is provided struct implemented at least one RPC methods with the signature like this: func(req lib.Request, res *lib.Response) (err error) see examples/plugin() for more info
type Request ¶
type Request struct { URL string RemoteAddr string Host string Header http.Header Route string // final destination Match struct { Server string Src string Dst string ProviderID string PingURL string MatchType string AssetsLocation string AssetsWebRoot string } }
Request sent to plugins
type Response ¶
type Response struct { StatusCode int HeadersIn http.Header HeadersOut http.Header OverrideHeadersIn bool // indicates plugin removing all the original incoming headers OverrideHeadersOut bool // indicates plugin removing all the original outgoing headers }
Response from plugin's handler call
Click to show internal directories.
Click to hide internal directories.