Documentation
¶
Overview ¶
Node-level utilities
Index ¶
- type MemoryStats
- type Node
- func (n Node) GetCtxSharedAny(k string) (interface{}, error)
- func (n Node) GetCtxSharedFloat(k string) (float64, error)
- func (n Node) GetCtxSharedString(k string) (string, error)
- func (n Node) GetId() (string, error)
- func (n Node) GetMemoryStats() (ms MemoryStats, err error)
- func (n Node) SetCtxShared(k string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStats ¶
type MemoryStats struct {
Kong struct {
AllocatedSlabs int `json:"allocated_slabs"`
Capacity int `json:"capacity"`
} `json:"kong"`
KongDbCache struct {
AllocatedSlabs int `json:"allocated_slabs"`
Capacity int `json:"capacity"`
} `json:"kong_db_cache"`
} `json:"lua_shared_dicts"`
WorkersLuaVms []struct {
HttpAllocatedGc int `json:"http_allocated_gc"`
Pid int `json:"pid"`
} `json:"workers_lua_vms"`
}
type Node ¶
Holds this module's functions. Accessible as `kong.Node`
func (Node) GetCtxSharedAny ¶ added in v0.3.1
kong.Node.GetCtxSharedAny() returns a value from the `kong.ctx.shared` request context table.
func (Node) GetCtxSharedFloat ¶ added in v0.3.1
kong.Node.GetCtxSharedFloat() returns a float value from the `kong.ctx.shared` request context table.
func (Node) GetCtxSharedString ¶ added in v0.3.1
kong.Node.GetCtxSharedString() returns a string value from the `kong.ctx.shared` request context table.
func (Node) GetMemoryStats ¶
func (n Node) GetMemoryStats() (ms MemoryStats, err error)
kong.Node.GetMemoryStats() returns memory usage statistics about this node.
func (Node) SetCtxShared ¶ added in v0.3.1
kong.Node.SetCtxShared() sets a value in the `kong.ctx.shared` request context table.
Click to show internal directories.
Click to hide internal directories.