Back to

Package pdk

Latest Go to latest
Published: May 27, 2020 | License: Apache-2.0 | Module:


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()`.


Package Files

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

func Init

func Init(ch chan interface{}) *PDK

Init initialize go pdk. Called by the pluginserver at initialization.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier