os.notify #

fn new #

fn new() ?FdNotifier

new creates a new EpollNotifier The FdNotifier interface is returned to allow OS specific implementations without exposing the concrete type

interface FdEvent #

interface FdEvent {
	fd int
	kind FdEventType
}

interface FdNotifier #

interface FdNotifier {
	add(fd int, events FdEventType, conf ...FdConfigFlags) ?
	modify(fd int, events FdEventType, conf ...FdConfigFlags) ?
	remove(fd int) ?
	wait(timeout time.Duration) []FdEvent
	close() ?
}

Backends should provide a new() ?FdNotifier function

enum FdConfigFlags #

enum FdConfigFlags {
	edge_trigger
	one_shot
	wake_up
	exclusive
}

enum FdEventType #

enum FdEventType {
	read
	write
	peer_hangup
	exception
	error
	hangup
}