John Eikenberry
7e76fd5451
close reader/writer when deleting request
2017-02-18 18:20:37 -08:00
John Eikenberry
016dabfa49
golint and go vet fixes
2017-02-18 18:20:37 -08:00
John Eikenberry
117dcd5916
refactor request setup into init and update
...
More understandable and adds additional type safety.
2017-02-18 18:20:37 -08:00
John Eikenberry
ce4586e8a5
convert request to be pass by value
...
Encapsulate stateful data into sub-structures with pointer references
from the Request structure. This allows me to pass by value in most
cases to keep non-stateful (write once) data data race free and tightly
controlling access to stateful data to ease locking.
2017-02-18 18:20:37 -08:00
John Eikenberry
94ae9c6822
fix issue with out-of-order packets
2017-02-18 18:20:37 -08:00
John Eikenberry
f18f3a1b48
govet fixes
2017-02-18 18:20:37 -08:00
John Eikenberry
bf94760e22
golinter suggested name fix
2017-02-18 18:20:37 -08:00
John Eikenberry
9962211713
linter fixes
2017-02-18 18:20:37 -08:00
John Eikenberry
96da577ac9
remove superfluous pflags field from request
...
Pflags specify file open operations which don't make sense for the
request based interface and they were never used.
2017-02-18 18:20:37 -08:00
John Eikenberry
34d67613fb
fix readlink name reference
2017-02-18 18:20:37 -08:00
John Eikenberry
3f4950f1d7
clean all incoming path data
2017-02-18 18:20:36 -08:00
John Eikenberry
e8d7a278de
move realpath handling into request-server
2017-02-18 18:20:36 -08:00
John Eikenberry
e3e8165290
save EOF state of readdir
2017-02-18 18:20:36 -08:00
John Eikenberry
15c875477a
add remove and realpath handling
2017-02-18 18:20:36 -08:00
John Eikenberry
dab4d2c9cb
forgot Remove command
2017-02-18 18:20:36 -08:00
John Eikenberry
f6042b29bc
remove redundant 'request' from handle method name
2017-02-18 18:20:36 -08:00
John Eikenberry
e307459f45
factor out response struct
2017-02-18 18:20:36 -08:00
John Eikenberry
14982642a1
couple fixed found while writing tests
2017-02-18 18:20:36 -08:00
John Eikenberry
42095a108c
move request.populate call out of handler
...
makes handler testing much simpler as it only needs a populated request
instead of faked packets.
2017-02-18 18:20:36 -08:00
John Eikenberry
2bf0b275fe
added a few comments
2017-02-18 18:20:36 -08:00
John Eikenberry
f3ebdef6de
factor out request channels
2017-02-18 18:20:36 -08:00
John Eikenberry
a253a470f0
move open handling to packet level
2017-02-18 18:20:36 -08:00
John Eikenberry
cdfae2dc1d
pass/store handlers on request vs server
2017-02-18 18:20:36 -08:00
John Eikenberry
595444c745
more work on decoupling packet/request handling
2017-02-18 18:20:36 -08:00
John Eikenberry
fd475710b5
add response channel from req to packet handler
...
working to decouple request handling from packet handling. adding a
response channel means I don't need to handle sending packets.
eliminated need for cur_pkt and sendError() on request objects so far.
2017-02-18 18:20:36 -08:00
John Eikenberry
ad74a75b7a
pass packets to handler wrapper
...
vs. using one saved on struct (trying to get rid of this one)
2017-02-18 18:20:36 -08:00
John Eikenberry
1876432871
Add explicit Open noop
2017-02-18 18:20:36 -08:00
John Eikenberry
39fd50db3d
better interface naming consistency
2017-02-18 18:20:36 -08:00
John Eikenberry
39e544ecfe
make RequestServer.Handlers public
2017-02-18 18:20:36 -08:00
John Eikenberry
e19ab67571
fleshed out processing handlers
2017-02-18 18:20:36 -08:00
John Eikenberry
06bf237860
reworked in branch and liked it
2017-02-18 18:20:36 -08:00