Documentation
¶
Index ¶
- func Dispatch(ctx context.Context, e event.Event) error
- type Kernel
- func (k *Kernel) Bootstrap(ctx context.Context) error
- func (k *Kernel) Dispatch(ctx context.Context, e event.Event) error
- func (k *Kernel) Run(ctx context.Context) error
- func (k *Kernel) RunHttpServer(ctx context.Context) error
- func (k *Kernel) RunListeners(ctx context.Context)
- func (k *Kernel) RunServices(ctx context.Context) error
- type KernelConfig
- type KernelOption
- func Bootstrap(bootstrap ...func(context.Context) error) KernelOption
- func Config(cb func() *KernelConfig) KernelOption
- func InitRoutes(cb func(r *router.Router)) KernelOption
- func Listeners(listeners ...*Listener) KernelOption
- func RootHandler(rootHandler func() http.Handler) KernelOption
- func Services(services ...Service) KernelOption
- type Listener
- type Restarter
- 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
func (*Kernel) RunHttpServer ¶ added in v0.5.0
func (*Kernel) RunListeners ¶ added in v0.5.0
type KernelConfig ¶ added in v0.5.0
type KernelConfig struct {
Port int
}
type KernelOption ¶
func Config ¶ added in v0.5.0
func Config(cb func() *KernelConfig) KernelOption
func InitRoutes ¶
func InitRoutes(cb func(r *router.Router)) KernelOption
func Listeners ¶ added in v0.3.0
func Listeners(listeners ...*Listener) KernelOption
func RootHandler ¶
func RootHandler(rootHandler func() 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
Click to show internal directories.
Click to hide internal directories.