fdnotifier

package
v0.0.0-...-385f433 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0, MIT Imports: 5 Imported by: 13

Documentation

Overview

Package fdnotifier contains an adapter that translates IO events (e.g., a file became readable/writable) from native FDs to the notifications in the waiter package. It uses epoll in edge-triggered mode to receive notifications for registered FDs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFD

func AddFD(fd int32, queue *waiter.Queue) error

AddFD adds an FD to the list of observed FDs.

func HasFD

func HasFD(fd int32) bool

HasFD returns true if the FD is in the list of observed FDs.

This should only be used by tests to assert that FDs are correctly registered.

func NonBlockingPoll

func NonBlockingPoll(fd int32, mask waiter.EventMask) waiter.EventMask

NonBlockingPoll polls the given FD in non-blocking fashion. It is used just to query the FD's current state.

func RemoveFD

func RemoveFD(fd int32)

RemoveFD removes an FD from the list of observed FDs.

func UpdateFD

func UpdateFD(fd int32) error

UpdateFD updates the set of events the fd needs to be notified on.

Types

This section is empty.

Jump to

Keyboard shortcuts

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