Write a custom middleware plugin for a 500-line Go framework (complete walkthrough)
This is part 3 of a series on GoWind , the framework behind our 20+ product suite: The building-block architecture — a core under 500 lines, 130+ plugins One YAML file is your architecture — assembling HTTP/gRPC/DB/cache/tracing from config alone A framework with a tiny core makes a bold implicit promise: you should be able to extend it without touching it . Today we're going to cash that promise…
This middleware plugin for a GoWind framework is a 500-line implementation, composed of over 130 plugins. It presents a core under 500 lines and supports assembly of HTTP/gRPC/DB/cache/tracing from a single YAML file. One of its key features is the IP blocklist, which works with exact IP addresses and CIDR ranges, and is configured entirely through YAML. The plugin is registered via the framework's SPI and is integrated with a single blank import.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to