Versions in this module Expand all Collapse all v1 v1.0.0 Feb 3, 2021 Changes in this version + func DefaultWorkerExecutor(handler cherryInterfaces.IHandler, worker *Worker) + type FilterFn func(msg *UnhandledMessage) bool + type Handler struct + func (h *Handler) AfterInit() + func (h *Handler) GetEvent(name string) ([]cherryInterfaces.EventFn, bool) + func (h *Handler) GetEvents() map[string][]cherryInterfaces.EventFn + func (h *Handler) GetLocal(funcName string) (*cherryInterfaces.InvokeFn, bool) + func (h *Handler) GetLocals() map[string]*cherryInterfaces.InvokeFn + func (h *Handler) GetRemote(funcName string) (*cherryInterfaces.InvokeFn, bool) + func (h *Handler) GetRemotes() map[string]*cherryInterfaces.InvokeFn + func (h *Handler) GetWorker(message interface{}) *Worker + func (h *Handler) HandlerComponent() *HandlerComponent + func (h *Handler) Init() + func (h *Handler) Name() string + func (h *Handler) PostEvent(e cherryInterfaces.IEvent) + func (h *Handler) PreInit() + func (h *Handler) PutMessage(message interface{}) + func (h *Handler) RegisterEvent(eventName string, fn cherryInterfaces.EventFn) + func (h *Handler) RegisterLocal(name string, fn interface{}) + func (h *Handler) RegisterLocals(sliceFn ...interface{}) + func (h *Handler) RegisterRemote(name string, fn interface{}) + func (h *Handler) RegisterRemotes(sliceFn ...interface{}) + func (h *Handler) SetName(name string) + func (h *Handler) Stop() + type HandlerComponent struct + func NewComponent() *HandlerComponent + func (h *HandlerComponent) DoHandle(msg *UnhandledMessage) + func (h *HandlerComponent) GetHandler(route *cherryRoute.Route) cherryInterfaces.IHandler + func (h *HandlerComponent) Init() + func (h *HandlerComponent) Name() string + func (h *HandlerComponent) PostEvent(event cherryInterfaces.IEvent) + func (h *HandlerComponent) RegisterWithName(name string, handler cherryInterfaces.IHandler) + func (h *HandlerComponent) Registers(handlers ...cherryInterfaces.IHandler) + func (h *HandlerComponent) Stop() + type HandlerComponentOptions struct + func (*HandlerComponentOptions) NodeRoute(nodeType string, routeFunc cherryInterfaces.RouteFunction) + func (c *HandlerComponentOptions) AfterFilter(afterFilters ...FilterFn) + func (c *HandlerComponentOptions) BeforeFilter(beforeFilters ...FilterFn) + func (c *HandlerComponentOptions) GetAfterFilter() []FilterFn + func (c *HandlerComponentOptions) GetBeforeFilter() []FilterFn + func (c *HandlerComponentOptions) SetNameFn(fn func(string) string) + type UnhandledMessage struct + Msg *cherryMessage.Message + Route *cherryRoute.Route + Session cherryInterfaces.ISession + type Worker struct + Index int + MessageChan chan interface{} + type WorkerExecuteFn func(handler cherryInterfaces.IHandler, worker *Worker) + type WorkerGroup struct + func (w *WorkerGroup) SetQueueSize(size int) + func (w *WorkerGroup) SetWorkerCRC32Hash(workerSize int) + func (w *WorkerGroup) SetWorkerExecutor(workerExecuteFn WorkerExecuteFn) + func (w *WorkerGroup) SetWorkerHash(workerSize int, hashFn WorkerHashFn) + func (w *WorkerGroup) SetWorkerRandHash(workerSize int) + func (w *WorkerGroup) WorkerMap() map[int]*Worker + type WorkerHashFn func(msg interface{}) int