Documentation ¶
Index ¶
- Variables
- type Kernel
- func (k *Kernel) Bootstrap(ctx context.Context) error
- func (k *Kernel) Config() KernelConfig
- func (k *Kernel) Logger(ctx context.Context) *slog.Logger
- func (k *Kernel) RootHandler(ctx context.Context) http.Handler
- func (k *Kernel) Run(ctx context.Context) error
- func (k *Kernel) RunHttpServer(ctx context.Context) error
- func (k *Kernel) RunServices(ctx context.Context)
- func (k *Kernel) Validate(ctx context.Context) error
- type KernelConfig
- type KernelOption
- type Restarter
- type Service
- type ServiceFunc
- type ServiceFuncRestart
- type Validator
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrAlreadyBootstrapped = errors.New("kernel already bootstrapped")
)
Functions ¶
This section is empty.
Types ¶
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
func New ¶
func New[T KernelConfig](options ...KernelOption) *Kernel
func (*Kernel) Config ¶ added in v0.11.0
func (k *Kernel) Config() KernelConfig
func (*Kernel) RootHandler ¶ added in v0.11.0
func (*Kernel) RunHttpServer ¶ added in v0.5.0
func (*Kernel) RunServices ¶ added in v0.5.0
type KernelConfig ¶ added in v0.5.0
type KernelOption ¶
func Config ¶ added in v0.5.0
func Config[T KernelConfig](cb func() T) KernelOption
func RootHandler ¶
func RootHandler(rootHandler func(ctx context.Context) http.Handler) KernelOption
func Services ¶ added in v0.3.0
func Services(services ...Service) KernelOption
type ServiceFunc ¶ added in v0.3.0
type ServiceFunc func() error
func (ServiceFunc) Restart ¶ added in v0.3.0
func (s ServiceFunc) Restart() bool
type ServiceFuncRestart ¶ added in v0.3.0
type ServiceFuncRestart func() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.