Documentation
      ¶
    
    
  
    
      Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var (
	ErrFlushed = errors.New("data was flushed")
)
    Functions ¶
This section is empty.
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 (*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) Flush ¶ added in v0.16.0
Flush unblocks Wait if it's epoll_wait, for purposes of reading pending samples
func (*Poller) Wait ¶
Wait for events.
Returns the number of pending events and any errors.
- os.ErrClosed if interrupted by [Close].
 - ErrFlushed if interrupted by [Flush].
 - os.ErrDeadlineExceeded if deadline is reached.
 
 Click to show internal directories. 
   Click to hide internal directories.