Documentation
¶
Index ¶
- type Event
- type EventHandler
- type Events
- type Interest
- type NetPoller
- func (poller *NetPoller) Add(fd int, want Interest) error
- func (poller *NetPoller) Close(err error) error
- func (poller *NetPoller) Closed() bool
- func (poller *NetPoller) Modify(fd int, _ Interest, want Interest) error
- func (poller *NetPoller) Remove(fd int, _ Interest) error
- func (poller *NetPoller) Serve(lockOSThread bool, handler EventHandler) error
- func (poller *NetPoller) Wait(out []Event, timeout int) (int, error)
- func (poller *NetPoller) Wake() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶ added in v1.1.0
Event is one level-triggered readiness notification. Readiness remains observable until the descriptor is no longer ready.
type EventHandler ¶
type Events ¶
type Events uint32
Events is a bitmask for read/write/error events. Poller implementations may pass these to OnEvent callback to handle multiple events in a single call (avoids double Get/dispatch for read+write).
type Interest ¶ added in v1.1.0
type Interest uint8
Interest is the desired readiness state for a watched descriptor.
type NetPoller ¶
type NetPoller struct {
// contains filtered or unexported fields
}
func NewNetPoller ¶
func (*NetPoller) Modify ¶ added in v1.1.0
Modify changes the interest of an already watched descriptor.
func (*NetPoller) Remove ¶ added in v1.1.0
Remove unregisters a descriptor. previous is used by kqueue backends.
func (*NetPoller) Serve ¶
func (poller *NetPoller) Serve(lockOSThread bool, handler EventHandler) error
Serve is retained as a compatibility wrapper around Wait.