How kong/kong-plugin works
Main Components
a) Kong Gateway Integration Layer
• How the plugin interfaces with Kong's core
• Plugin's lifecycle hooks
• Configuration management
b) Plugin Core Components
• Handler module (handler.lua)
• Schema module (schema.lua)
• Configuration validation layer
c) Testing Infrastructure
• Unit tests
• Integration tests
• Pongo test environment
Layer 1: Kong Gateway (Parent System)
Layer 2: Plugin Registration & Configuration
Layer 3: Plugin Core Components
Layer 4: Testing & Development Infrastructure
Specific Elements
a) Component Relationships:
• How the plugin handler interfaces with Kong's request/response lifecycle
• Configuration flow from schema validation to handler initialization
• Demonstrate test coverage interaction with components
• Blue: Kong core components
• Green: Plugin core modules
• Yellow: Configuration components
• Gray: Testing infrastructure
Key Interactions to Highlight
• Schema validation flow
• Request/response processing
• Plugin initialization sequence
• Test execution paths
Technical Details
• Lua module dependencies
• Version information
• Configuration schema flow
• Integration points with Kong's plugin system
Test coverage across components
Keep the abstraction level focused on the plugin's architecture while showing its integration points with Kong Gateway. This will help developers understand both the plugin's internal structure and its interaction with the larger Kong ecosystem.