Documentation
¶
Index ¶
- func Dispatch(e event.Event)
- type Kernel
- type KernelOption
- func Bootstrap(bootstrap ...func(context.Context) error) KernelOption
- func InitRoutes(cb func(r *router.Router)) KernelOption
- func Listeners(listeners ...*Listener) KernelOption
- func Middleware(middleware ...router.MiddlewareFunc) KernelOption
- func Port(cb func() int) KernelOption
- func RootHandler(rootHandler http.Handler) KernelOption
- func Services(services ...Service) KernelOption
- type Listener
- type Service
- type ServiceFunc
- type ServiceFuncRestart
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
func New ¶
func New(options ...KernelOption) *Kernel
func NewDefaultKernel ¶ added in v0.3.0
func NewDefaultKernel(options ...KernelOption) *Kernel
type KernelOption ¶
func InitRoutes ¶
func InitRoutes(cb func(r *router.Router)) KernelOption
func Listeners ¶ added in v0.3.0
func Listeners(listeners ...*Listener) KernelOption
func Middleware ¶
func Middleware(middleware ...router.MiddlewareFunc) KernelOption
func Port ¶
func Port(cb func() int) KernelOption
func RootHandler ¶
func RootHandler(rootHandler http.Handler) KernelOption
func Services ¶ added in v0.3.0
func Services(services ...Service) KernelOption
type ServiceFunc ¶ added in v0.3.0
func (ServiceFunc) Restart ¶ added in v0.3.0
func (s ServiceFunc) Restart() bool
type ServiceFuncRestart ¶ added in v0.3.0
func (ServiceFuncRestart) Restart ¶ added in v0.3.0
func (s ServiceFuncRestart) Restart() bool
Click to show internal directories.
Click to hide internal directories.