Documentation ¶
Overview ¶
Package fs provides access to the file system on the host.
It exposes ioctl syscall and epoll in an OS agnostic way and permits completely disabling file access to lock down unit tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
Event is a file system event.
func (*Event) MakeEvent ¶
MakeEvent initializes an epoll *edge* triggered event on linux.
An edge triggered event is basically an "auto-reset" event, where waiting on the edge resets it. A level triggered event requires manual resetting; this could be done via a Read() call but there's no need to require the user to call Read(). This is particularly useless in the case of gpio.RisingEdge and gpio.FallingEdge.
As per the official doc, edge triggers is still remembered even when no epoll_wait() call is running, so no edge is missed. Two edges will be coallesced into one if the user mode process can't keep up. There's no accumulation of edges.