engine

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Reactor engine.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	Listener  iface.IListener
	Balancer  iface.IBalancer
	MainLoop  *eloop.Eloop
	Handler   iface.IEventHandler
	IsClosing int32
	Options   *iface.Options
	Pool      *ants.Pool
	// contains filtered or unexported fields
}

func New

func New() *Engine

func (*Engine) GetBalancer

func (that *Engine) GetBalancer() iface.IBalancer

func (*Engine) GetHandler

func (that *Engine) GetHandler() iface.IEventHandler

func (*Engine) GetOptions

func (that *Engine) GetOptions() *iface.Options

func (*Engine) Serve

func (that *Engine) Serve(handler iface.IEventHandler, ln iface.IListener, opt *iface.Options) (err error)

TODO: reuseport options

func (*Engine) Stop

func (that *Engine) Stop()

send stop signal to the engine.

Jump to

Keyboard shortcuts

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