kong.ctx package

Submodules

kong.ctx.shared module

class kong.ctx.shared.shared[source]

Bases: object

static get(k: str) Any[source]

get a key-value pair from Kong’s shared memory

Parameters:

k (str) – key for the ctx data

Returns:

the per-request context data in ngx.ctx

Return type:

Any

static set(k: str, v: str) None[source]

set a key-value pair in Kong’s shared memory

Parameters:
  • k (str) – key for the ctx data

  • v (str) – value for the ctx data

Module contents

class kong.ctx.ctx[source]

Bases: object

class shared

Bases: object

static get(k: str) Any

get a key-value pair from Kong’s shared memory

Parameters:

k (str) – key for the ctx data

Returns:

the per-request context data in ngx.ctx

Return type:

Any

static set(k: str, v: str) None

set a key-value pair in Kong’s shared memory

Parameters:
  • k (str) – key for the ctx data

  • v (str) – value for the ctx data