package epoll
import "github.com/cilium/ebpf/internal/epoll"
Index ¶
Types ¶
type Poller ¶
type Poller struct {
// contains filtered or unexported fields
}
Poller waits for readiness notifications from multiple file descriptors.
The wait can be interrupted by calling Close.
func New ¶
func (*Poller) Add ¶
Add an fd to the poller.
id is returned by Wait in the unix.EpollEvent.Pad field any may be zero. It must not exceed math.MaxInt32.
Add is blocked by Wait.
func (*Poller) Close ¶
Close the poller.
Interrupts any calls to Wait. Multiple calls to Close are valid, but subsequent calls will return os.ErrClosed.
func (*Poller) Wait ¶
Wait for events.
Returns the number of pending events or an error wrapping os.ErrClosed if Close is called, or os.ErrDeadlineExceeded if EpollWait timeout.
Source Files ¶
- Version
- v0.10.0
- Published
- Jan 13, 2023
- Platform
- linux/amd64
- Imports
- 8 packages
- Last checked
- 2 hours ago –
Tools for package owners.