Simple Golang event-driven framework for web applications.
go get github.com/bassbeaver/gkernel
Main idea of this framework is to organize request processing flow which is:
- controlled by events
- processed by services, and services are managed by Service Container
Main structure blocks of gkernel are:
- Service Container or just Container, entity to provide service location and dependency injection. bassbeaver/gioc is used for it.
- Request - represents an HTTP request received by a server. Gkernel uses standard net/http Request type.
- Response - instance, encapsulating data, that should be sent to user as a result of HTTP request.
- Route - instance describing bindings between request (http method, url) and controller. Also route has its own event bus.
- Command - instance describing console command passed to programm in CLI environment.
- Controller - instance to process request.
- Event - instance indicating that something has happened in system. Events are processed via event buses and event listeners.
Also gkernel provides simple and convenient way to configure all of this things using config file in yaml format.
More detailed documentation: https://bassbeaver.github.io/gkernel-docs/
Example project: https://github.com/bassbeaver/gkernel-skeleton