Proxy prefetch cache becomes a command-line argument.

This commit is contained in:
Alex Young
2014-02-27 14:21:36 +00:00
parent aba802d415
commit fa8023cf69
13 changed files with 435 additions and 240 deletions

View File

@@ -198,6 +198,8 @@ module FlexNBD
end
end
attr_accessor :prefetch_proxy
def initialize( bin, ip, port )
@bin = bin
@do_debug = ENV['DEBUG']
@@ -208,6 +210,7 @@ module FlexNBD
@ip = ip
@port = port
@kill = []
@prefetch_proxy = false
end
@@ -247,6 +250,7 @@ module FlexNBD
"--port #{port} "\
"--conn-addr #{connect_ip} "\
"--conn-port #{connect_port} "\
"#{prefetch_proxy ? "--cache " : ""}"\
"#{@debug}"
end