mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
fn: reduce lbagent and agent dependency (#938)
* fn: reduce lbagent and agent dependency lbagent and agent code is too dependent. This causes any changed in agent to break lbagent. In reality, for LB there should be no delegated agent. Splitting these two will cause some code duplication, but it reduces dependency and complexity (eg. agent without docker) * fn: post rebase fixup * fn: runner/runnercall should use lbDeadline * fn: fixup ln agent test * fn: remove agent create option for common.WaitGroup
This commit is contained in:
@@ -74,6 +74,20 @@ type nopCloser struct {
|
||||
|
||||
func (n *nopCloser) Close() error { return nil }
|
||||
|
||||
type nullReadWriter struct {
|
||||
io.ReadCloser
|
||||
}
|
||||
|
||||
func (n *nullReadWriter) Close() error {
|
||||
return nil
|
||||
}
|
||||
func (n *nullReadWriter) Read(b []byte) (int, error) {
|
||||
return 0, io.EOF
|
||||
}
|
||||
func (n *nullReadWriter) Write(b []byte) (int, error) {
|
||||
return 0, io.EOF
|
||||
}
|
||||
|
||||
// multiWriteCloser returns the first write or close that returns a non-nil
|
||||
// err, if no non-nil err is returned, then the returned bytes written will be
|
||||
// from the last call to write.
|
||||
|
||||
Reference in New Issue
Block a user