Documentation ¶
Overview ¶
Package Kong/go-pdk implements Kong's Plugin Development Kit for Go.
It directly parallels the existing kong PDK for Lua plugins.
Kong plugins written in Go implement event handlers as methods on the Plugin's structure, with the given signature:
func (conf *MyConfig) Access (kong *pdk.PDK) { ... }
The `kong` argument of type `*pdk.PDK` is the entrypoint for all PDK functions. For example, to get the client's IP address, you'd use `kong.Client.GetIp()`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PDK ¶
type PDK struct { Client client.Client Ctx ctx.Ctx Log log.Log Nginx nginx.Nginx Request request.Request Response response.Response Router router.Router IP ip.Ip Node node.Node Service service.Service ServiceRequest service_request.Request ServiceResponse service_response.Response }
PDK go pdk module
Directories ¶
Path | Synopsis |
---|---|
Used internally for the RPC protocol.
|
Used internally for the RPC protocol. |
Client information module.
|
Client information module. |
Current request context data.
|
Current request context data. |
Some struct definitons for Kong entities.
|
Some struct definitons for Kong entities. |
Trusted IPs module.
|
Trusted IPs module. |
Write to log file.
|
Write to log file. |
Access Nginx APIs.
|
Access Nginx APIs. |
Node-level utilities
|
Node-level utilities |
Client request module.
|
Client request module. |
Client response module.
|
Client response module. |
Router module.
|
Router module. |
Service module.
|
Service module. |
request
Manipulation of the request to the Service.
|
Manipulation of the request to the Service. |
response
Manipulation of the response from the Service.
|
Manipulation of the response from the Service. |
Utilities to test plugins.
|
Utilities to test plugins. |
Click to show internal directories.
Click to hide internal directories.