Documentation
¶
Index ¶
- Constants
- func RunKernel(options ...Option)
- type Kernel
- func (kernel *Kernel) ID() string
- func (kernel *Kernel) RegisterRecovers() func()
- func (kernel *Kernel) RegisterShutdown(name string, fn func(), priority int)
- func (kernel *Kernel) RegisterWatchdogsLeadership(supervisor *LeaderSupervisor)
- func (kernel *Kernel) Run()
- func (kernel *Kernel) Start(cancel context.CancelFunc)
- func (kernel *Kernel) StartWatchdogsLeadership()
- func (kernel *Kernel) Stop()
- type KernelConfig
- type LeaderSupervisor
- type Option
Constants ¶
View Source
const ( LowestPriority = 10000 LowPriority = 1000 MediumPriority = 500 HighPriority = 100 HighestPriority = 50 CriticalPriority = 20 ImmediatePriority = 1 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
func NewDefaultKernel ¶
func (*Kernel) RegisterRecovers ¶
func (kernel *Kernel) RegisterRecovers() func()
func (*Kernel) RegisterShutdown ¶
func (*Kernel) RegisterWatchdogsLeadership ¶
func (kernel *Kernel) RegisterWatchdogsLeadership(supervisor *LeaderSupervisor)
func (*Kernel) Start ¶
func (kernel *Kernel) Start(cancel context.CancelFunc)
func (*Kernel) StartWatchdogsLeadership ¶
func (kernel *Kernel) StartWatchdogsLeadership()
type KernelConfig ¶
type LeaderSupervisor ¶
type LeaderSupervisor struct {
Watcher <-chan int
Start func()
Stop func()
Watchdog watchdog.LeaderElectingWatchdog
SupervisorName string
Working bool
// contains filtered or unexported fields
}
type Option ¶
type Option func(krl *Kernel)
func WithConfigs ¶
func WithConfigs(config KernelConfig) Option
Click to show internal directories.
Click to hide internal directories.