Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/npat-efault/poller
/ functions
Functions
91 in github.com/npat-efault/poller
⨍
Functions
91
◇
Types & classes
9
↓ 47 callers
Function
debugf
(format string, v ...interface{})
poller.go:347
↓ 26 callers
Method
Close
Close the file descriptor. It is ok to call Close concurently with other operations (Read, Write, SetDeadline, etc) on the same file-descriptor. In th
poller.go:211
↓ 25 callers
Method
Unlock
Unlock unlocks the file-descriptor.
poller.go:337
↓ 21 callers
Method
Lock
Lock the file-descriptor. It must be called before perfoming miscellaneous operations (e.g. ioctls) on the underlying system file descriptor. It prote
poller.go:327
↓ 17 callers
Function
openFifo
(t *testing.T, i int, read bool)
poller_test.go:35
↓ 11 callers
Function
waitN
(t *testing.T, ch <-chan error, n int)
poller_test.go:64
↓ 10 callers
Method
Error
()
error.go:23
↓ 10 callers
Method
Read
TODO(npat): Add FromFile function? Read up to len(p) bytes into p. Returns the number of bytes read (0 <= n <= len(p)) and any error encountered. If s
poller.go:161
↓ 9 callers
Method
Write
Writes len(p) bytes from p to the file-descriptor. Returns the number of bytes written (0 <= n <= len(p)) and any error encountered that caused the w
poller.go:194
↓ 8 callers
Method
GetFD
GetFD returns the FD with key id. Returns nil if no such FD is in the map.
poller.go:46
↓ 8 callers
Function
mkFifo
(t *testing.T, i int)
poller_test.go:26
↓ 6 callers
Method
SetReadDeadline
SetReadDeadline sets the deadline for Read operations on the file-descriptor.
poller.go:253
↓ 6 callers
Function
readStr
(fd *FD, s string)
poller_test.go:72
↓ 5 callers
Function
writeStr
(fd *FD, s string)
poller_test.go:87
↓ 4 callers
Method
Clear
(sysfd int, rw dirFlag)
poller_select.go:101
↓ 4 callers
Method
Seq
()
echo_test.go:124
↓ 4 callers
Method
SetWriteDeadline
SetWriteDeadline sets the deadline for Write operations on the file-descriptor.
poller.go:259
↓ 4 callers
Function
openFifo
(t *testing.T, i int, read bool)
echo_test.go:244
↓ 4 callers
Function
waitNTmo
(t *testing.T, ch <-chan error, n int, d time.Duration)
poller_test.go:68
↓ 3 callers
Method
IsSet
(fd int)
select_cgo.go:53
↓ 3 callers
Method
Zero
()
select_cgo.go:49
↓ 3 callers
Function
fifoName
(i int)
echo_test.go:223
↓ 3 callers
Function
readBlock
(fd *FD, n, bs int, dly time.Duration)
poller_test.go:98
↓ 3 callers
Function
writeBlock
(fd *FD, n, bs int, dly time.Duration)
poller_test.go:119
↓ 2 callers
Method
AddFD
AddFD creates an entry for the FD with key "fd.id".
poller.go:63
↓ 2 callers
Method
Clr
(fds ...int)
select_cgo.go:37
↓ 2 callers
Method
Data
()
echo_test.go:129
↓ 2 callers
Method
DelFD
(id int)
poller.go:73
↓ 2 callers
Method
Init
()
poller_select.go:42
↓ 2 callers
Function
NewFD
NewFD initializes and returns a new poller file-descriptor from the given system (unix) file-descriptor. After calling NewFD the system file-descripto
poller.go:146
↓ 2 callers
Method
Send
(w io.Writer)
echo_test.go:133
↓ 2 callers
Method
Set
(sysfd int, rw dirFlag)
poller_select.go:84
↓ 2 callers
Method
SetDeadline
SetDeadline sets the deadline for both Read and Write operations on the file-descriptor. Deadlines are expressed as ABSOLUTE instances in time. For ex
poller.go:244
↓ 2 callers
Function
debugSets
(pref string, rs, ws *fdSet, nfds int)
poller_select.go:167
↓ 2 callers
Function
epollEvent
(ev *syscall.EpollEvent, write bool)
poller_epoll.go:240
↓ 2 callers
Function
fdIO
* - We use Edge Triggered notifications so we can only sleep (cond.Wait) when the syscall (Read/Write) returns with EAGAIN - While sleeping we don
poller_epoll.go:81
↓ 2 callers
Function
fifoName
tmp/poller-test-fifoXXX
poller_test.go:22
↓ 2 callers
Function
mkErr
(flags errFlags, msg string)
error.go:39
↓ 2 callers
Function
mkFifo
(t *testing.T, i int)
echo_test.go:227
↓ 2 callers
Function
rcvMsg
(r io.Reader)
echo_test.go:138
↓ 2 callers
Function
rmFifo
(t *testing.T, i int)
echo_test.go:236
↓ 2 callers
Function
setDeadline
TODO(npat): If deadline is not After(time.Now()) wake-up goroutines imediatelly; don't go through the timer callback
poller.go:266
↓ 2 callers
Function
setStr
(s *fdSet, nfd int)
poller_select.go:145
↓ 2 callers
Function
uxSelect
(nfd int, r, w, e *fdSet, tv *syscall.Timeval)
select_bsd.go:12
↓ 2 callers
Function
waitNTmo_
(t *testing.T, ch <-chan error, n int, d time.Duration)
poller_test.go:48
↓ 1 callers
Method
CloseUnlocked
CloseUnlocked is equivalent to (*FD).Close, with the difference that with CloseUnlocked the caller is responsible for locking the FD before calling it
poller.go:227
↓ 1 callers
Method
GetID
GetID reserves and returns the next available ID
poller.go:54
↓ 1 callers
Method
Init
(n int)
poller.go:37
↓ 1 callers
Method
Len
()
echo_test.go:119
↓ 1 callers
Method
Notify
()
poller_select.go:117
↓ 1 callers
Function
Open
Open the named path for reading, writing or both, depnding on the flags argument.
poller.go:133
↓ 1 callers
Method
Set
(fds ...int)
select_cgo.go:43
↓ 1 callers
Method
closeUnlocked
* - Close / CloseUnlocked must acquire *all* locks (read, write and C) before proceeding. Otherwise there is the danger that a concurent re
poller_epoll.go:168
↓ 1 callers
Method
drainPfdr
()
poller_select.go:133
↓ 1 callers
Function
echoN
(r, w *poller.FD, n int)
echo_test.go:191
↓ 1 callers
Method
getSets
()
poller_select.go:126
↓ 1 callers
Function
isReadEvent
(ev *syscall.EpollEvent)
poller_epoll.go:275
↓ 1 callers
Function
isWriteEvent
(ev *syscall.EpollEvent)
poller_epoll.go:282
↓ 1 callers
Function
newFD
TODO(npat): Add finalizer
poller_epoll.go:23
↓ 1 callers
Function
packRandData
(p []byte, n int)
echo_test.go:75
↓ 1 callers
Function
packUInt16BE
(p []byte, i uint16)
echo_test.go:55
↓ 1 callers
Function
packUInt32BE
tmp/poller-test-fifoXXX
echo_test.go:47
↓ 1 callers
Function
poller
()
poller_epoll.go:288
↓ 1 callers
Function
randMsg
(seq uint32)
echo_test.go:104
↓ 1 callers
Method
run
run runs as the select-goroutine. It never returns.
poller_select.go:175
↓ 1 callers
Function
sendN
(r, w *poller.FD, n int)
echo_test.go:154
↓ 1 callers
Function
timerEvent
(id int, write bool)
poller_epoll.go:204
↓ 1 callers
Function
unpackUInt16BE
(p []byte)
echo_test.go:69
↓ 1 callers
Function
unpackUInt32BE
(p []byte)
echo_test.go:61
↓ 1 callers
Function
waitNTmo
(t *testing.T, ch <-chan error, n int, d time.Duration)
echo_test.go:257
Method
Closed
()
error.go:35
Method
Sysfd
Sysfd returns the system file-descriptor associated with the given poller file-descriptor. See also (*FD).Lock.
poller.go:343
Method
Temporary
()
error.go:31
Function
TestClose
(t *testing.T)
poller_test.go:168
Function
TestCloseWrite
(t *testing.T)
poller_test.go:268
Function
TestDeadlines
(t *testing.T)
poller_test.go:402
Function
TestEcho
(t *testing.T)
echo_test.go:273
Function
TestNewFDFail
(t *testing.T)
poller_epoll_test.go:15
Function
TestOpen
(t *testing.T)
poller_test.go:136
Function
TestRead
(t *testing.T)
poller_test.go:303
Function
TestWrite
(t *testing.T)
poller_test.go:347
Function
TestXBlock
TestXBlock tests if a blocking misc call for an FD (fd1r---keeping the FD locked for the duration), blocks access to another FD (fd0r). With v1.0.0 it
poller_test.go:502
Method
Timeout
()
error.go:27
Method
closeUnlocked
* - Close / CloseUnlocked must acquire *all* locks (read, write and C) before proceeding. Otherwise there is the danger that a concurent re
poller_select.go:399
Function
fdIO
* - We use Level-Triggered notifications. We first attempt to read or write, and if we get EAGAIN, we add sysfd to the set of monitored filedescr
poller_select.go:312
Function
init
()
poller_select.go:476
Function
init
TODO(npat): Support systems that don't have EpollCreate1
poller_epoll.go:316
Function
newErr
(msg string)
error.go:43
Function
newFD
(sysfd int)
poller_select.go:258
Function
timerEvent
(sysfd int, write bool)
poller_select.go:428
Function
uxSelect
(nfd int, r, w, e *fdSet, tv *syscall.Timeval)
select_linux.go:12