Documentation
¶
Index ¶
- type Dispatcher
- type Service
- func (s *Service) AddDispatcherHandler(dispatcherName string, handler base.DispatcherHander, handlerName ...string) error
- func (s *Service) CreateDispatcher(dispatcherName string, params ...uint) error
- func (s *Service) Dispatch(dispatcherName string, data interface{}) error
- func (s *Service) Init(app sptty.ISptty) error
- func (s *Service) Release()
- func (s *Service) RemoveDispatcher(dispatcherName string) error
- func (s *Service) RemoveDispatcherHandler(dispatcherName string, handlerName string) error
- func (s *Service) ServiceName() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
func CreateDispatcher ¶
func CreateDispatcher(params ...uint) *Dispatcher
param1: buffer size param2: worker num
func (*Dispatcher) AddHandler ¶
func (s *Dispatcher) AddHandler(handler base.DispatcherHander, handlerName ...string)
func (*Dispatcher) Dispatch ¶
func (s *Dispatcher) Dispatch(data interface{})
func (*Dispatcher) Release ¶
func (s *Dispatcher) Release()
func (*Dispatcher) RemoveHandler ¶
func (s *Dispatcher) RemoveHandler(handlerName string)
type Service ¶
type Service struct {
sptty.BaseService
base.IServiceDispatcher
// contains filtered or unexported fields
}
func (*Service) AddDispatcherHandler ¶
func (*Service) CreateDispatcher ¶
func (*Service) RemoveDispatcher ¶
func (*Service) RemoveDispatcherHandler ¶
func (*Service) ServiceName ¶
Click to show internal directories.
Click to hide internal directories.