Skip to content

Instantly share code, notes, and snippets.

View RobertMlo's full-sized avatar

RobertMlo

View GitHub Profile
--------------------------------------------------------------------------------------------
./kong/conf_loader.lua
--------------------------------------------------------------------------------------------
database = {enum = {"postgres", "cassandra", "maria"}},
maria_port = {typ = "number"},
maria_password = {typ = "string"},
maria_ssl = {typ = "boolean"},
maria_ssl_verify = {typ = "boolean"},
@RobertMlo
RobertMlo / kong_startup_logs_case_1.lua
Last active February 22, 2018 08:08
kong startup logs
2018/02/22 08:07:55 [verbose] Kong: 0.11.1
2018/02/22 08:07:55 [debug] ngx_lua: 10008
2018/02/22 08:07:55 [debug] nginx: 1011002
2018/02/22 08:07:55 [debug] Lua: LuaJIT 2.1.0-beta2
2018/02/22 08:07:55 [verbose] no config file found at /etc/kong/kong.conf
2018/02/22 08:07:55 [verbose] no config file found at /etc/kong.conf
2018/02/22 08:07:55 [verbose] no config file, skipping loading
2018/02/22 08:07:55 [debug] KONG_LOG_LEVEL ENV found with "debug"
2018/02/22 08:07:55 [debug] KONG_MEM_CACHE_SIZE ENV found with "128m"
Error:
@RobertMlo
RobertMlo / kong_startup_logs_case_2.lua
Last active February 22, 2018 08:08
Kong startup logs
2018/02/22 08:06:37 [verbose] Kong: 0.11.1
2018/02/22 08:06:37 [debug] ngx_lua: 10008
2018/02/22 08:06:37 [debug] nginx: 1011002
2018/02/22 08:06:37 [debug] Lua: LuaJIT 2.1.0-beta2
2018/02/22 08:06:37 [verbose] no config file found at /etc/kong/kong.conf
2018/02/22 08:06:37 [verbose] no config file found at /etc/kong.conf
2018/02/22 08:06:37 [verbose] no config file, skipping loading
2018/02/22 08:06:37 [debug] KONG_LRU_CACHE_SIZE ENV found with "500000"
2018/02/22 08:06:37 [debug] KONG_LOG_LEVEL ENV found with "debug"
2018/02/22 08:06:37 [debug] KONG_MEM_CACHE_SIZE ENV found with "128m"
@RobertMlo
RobertMlo / kong_log.log
Created February 21, 2018 08:03
Kong logs regarding a Kong cache mechanism.
#########################################
## CACHING FILES FROM 1 TO 10 [STEP 5]
#########################################
2018/02/21 07:17:49 [error] 2188#0: *293 [lua] handler.lua:118: count(): Size of cache: 10
2018/02/21 07:17:49 [error] 2188#0: *293 [lua] handler.lua:152: access(): ===================================================
2018/02/21 07:17:49 [error] 2188#0: *293 [lua] handler.lua:153: access(): Caching file no 1
2018/02/21 07:17:49 [debug] 2188#0: *293 [lua] Kong_logger.lua:103: log(): Fetching a file using the Kong cache.
2018/02/21 07:17:49 [notice] 2188#0: *293 [lua] Kong_logger.lua:103: log(): Fetching a file from L3.
2018/02/21 07:17:49 [error] 2188#0: *293 [lua] handler.lua:156: access(): Response from cache#get(): Key: 1, Sum: 20abfc2bcc301f47f58aacef86651316, Value: table: 0x40e1d4a0, Error: nil
@RobertMlo
RobertMlo / oas3.yaml
Last active February 15, 2018 07:51
oas 3.0 yaml
openapi: 3.0.0
info:
title: Other
version: "3.0"
servers:
- url: http://localhost:8080/other-v3-3.0
description: standard test dev server
paths:
/api/test/users/{id}:
get: