epoll

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEpollEmptyEvents = errors.New("epoll empty event")
)
View Source
var (
	ErrInvalidEOF = errors.New("invalid eof chars")
)
View Source
var (
	ErrInvalidPoolType = errors.New("invalid data type from pool")
)

Functions

This section is empty.

Types

type Config added in v1.3.0

type Config struct {
	Epoll ConfigItem `yaml:"epoll" json:"epoll"`
}

Config model

func (Config) MarshalEasyJSON added in v1.3.0

func (Config) MarshalEasyJSON(w *jwriter.Writer)

func (Config) MarshalJSON added in v1.3.0

func (Config) MarshalJSON() ([]byte, error)

func (*Config) UnmarshalEasyJSON added in v1.3.0

func (*Config) UnmarshalEasyJSON(l *jlexer.Lexer)

func (*Config) UnmarshalJSON added in v1.3.0

func (*Config) UnmarshalJSON([]byte) error

type ConfigItem

type ConfigItem struct {
	Addr string `yaml:"addr" json:"addr"`
}

ConfigItem model

func (ConfigItem) MarshalEasyJSON added in v1.3.0

func (ConfigItem) MarshalEasyJSON(w *jwriter.Writer)

func (ConfigItem) MarshalJSON added in v1.3.0

func (ConfigItem) MarshalJSON() ([]byte, error)

func (*ConfigItem) UnmarshalEasyJSON added in v1.3.0

func (*ConfigItem) UnmarshalEasyJSON(l *jlexer.Lexer)

func (*ConfigItem) UnmarshalJSON added in v1.3.0

func (*ConfigItem) UnmarshalJSON([]byte) error

type ConnectionHandler

type ConnectionHandler func([]byte, io.Writer) error

ConnectionHandler ...

type EasyJSON_exporter_Config added in v1.3.0

type EasyJSON_exporter_Config *Config

type EasyJSON_exporter_ConfigItem added in v1.3.0

type EasyJSON_exporter_ConfigItem *ConfigItem

type Epoll

type Epoll struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Epoll ...

func NewEpoll

func NewEpoll(log logger.Logger) (*Epoll, error)

New init epoll

func (*Epoll) AddOrClose

func (e *Epoll) AddOrClose(c net.Conn) error

AddOrClose ...

func (*Epoll) Close

func (e *Epoll) Close(c *NetItem) error

Close ...

func (*Epoll) CloseAll

func (e *Epoll) CloseAll() (er error)

CloseAll ...

func (*Epoll) Wait

func (e *Epoll) Wait() (NetSlice, error)

Wait ...

type Events added in v1.3.0

type Events []unix.EpollEvent

type NetItem added in v1.3.0

type NetItem struct {
	Conn net.Conn

	Fd int
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*NetItem) Await added in v1.3.0

func (n *NetItem) Await(b bool)

Await ...

func (*NetItem) IsAwait added in v1.3.0

func (n *NetItem) IsAwait() bool

IsAwait ...

type NetMap added in v1.3.0

type NetMap map[int]*NetItem

type NetSlice added in v1.3.0

type NetSlice []*NetItem

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server ...

func New added in v1.3.0

func New(conf *Config, handler ConnectionHandler, log logger.Logger) *Server

NewServer ...

func NewCustomServer

func NewCustomServer(conf ConfigItem, handler ConnectionHandler, eof []byte, log logger.Logger) *Server

NewCustomServer ...

func (*Server) Down

func (s *Server) Down() (err error)

Down ...

func (*Server) Up

func (s *Server) Up() (err error)

Up ...

Jump to

Keyboard shortcuts

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