runservice

package
v0.0.0-...-799f385 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetScheMgr

func GetScheMgr() *sche.ScheMgr

Types

type RunService

type RunService struct {
	Name string
	// contains filtered or unexported fields
}

代表一个可执行的service 每个一个单独的routine 是一个可投递目标 可以用selector来定制循环

func NewRunService

func NewRunService(name string) *RunService

func (*RunService) GetScheduler

func (self *RunService) GetScheduler() *sche.Sche

func (*RunService) GetSelector

func (self *RunService) GetSelector() *sche.MultiSelector

func (*RunService) Start

func (self *RunService) Start()

func (*RunService) Stop

func (self *RunService) Stop()

type StandardRunService

type StandardRunService struct {
	RunService
	TimerMgr    *timer.TimerMgr
	EventCenter *event.LocalEventCenter
}

标准RunService,方便使用 拥有timer 事件中心

func NewStandardRunService

func NewStandardRunService(name string) *StandardRunService

func (*StandardRunService) GetEventCenter

func (self *StandardRunService) GetEventCenter() *event.LocalEventCenter

func (*StandardRunService) GetTimerMgr

func (self *StandardRunService) GetTimerMgr() *timer.TimerMgr

func (*StandardRunService) Start

func (self *StandardRunService) Start()

func (*StandardRunService) Stop

func (self *StandardRunService) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL