epoll

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package epoll implements the epoll-based I/O engine for Linux.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine implements the epoll-based I/O engine.

func New

func New(cfg resource.Config, handler stream.Handler) (*Engine, error)

New creates a new epoll engine.

func (*Engine) Addr

func (e *Engine) Addr() net.Addr

Addr returns the bound listener address.

func (*Engine) Listen

func (e *Engine) Listen(ctx context.Context) error

Listen starts the epoll engine and blocks until context is canceled.

func (*Engine) Metrics

func (e *Engine) Metrics() engine.EngineMetrics

Metrics returns a snapshot of engine metrics.

func (*Engine) PauseAccept added in v0.3.0

func (e *Engine) PauseAccept() error

PauseAccept stops accepting new connections while keeping existing ones alive.

func (*Engine) ResumeAccept added in v0.3.0

func (e *Engine) ResumeAccept() error

ResumeAccept starts accepting new connections again. Wakes any suspended loops so they re-create listen sockets.

func (*Engine) Shutdown

func (e *Engine) Shutdown(_ context.Context) error

Shutdown gracefully shuts down the engine.

func (*Engine) Type

func (e *Engine) Type() engine.EngineType

Type returns the engine type.

type Loop

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

Loop is an epoll-based event loop worker.

Jump to

Keyboard shortcuts

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