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 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. |
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 variables.
|
Access Nginx variables. |
Node-level utilities
|
Node-level utilities |
A set of functions to retrieve information about the incoming requests made by clients.
|
A set of functions to retrieve information about the incoming requests made by clients. |
Client response module.
|
Client response module. |
Router module.
|
Router module. |
The service module contains a set of functions to manipulate the connection aspect of the request to the Service, such as connecting to a given host, IP address/port, or choosing a given Upstream entity for load-balancing and healthchecking.
|
The service module contains a set of functions to manipulate the connection aspect of the request to the Service, such as connecting to a given host, IP address/port, or choosing a given Upstream entity for load-balancing and healthchecking. |
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. |
Click to show internal directories.
Click to hide internal directories.