responseFormats = "link|json|cdxj" validDatetimes = "YYYY[MM[DD[hh[mm[ss]]]]]" ) var ( logBenchmark *log.Logger logInfo *log.Logger logError *log.Logger logFatal *log.Logger transport http.Transport client http.Client broker *sse.Broker baseURL string ) var format = flag.String([]string{"f", "-format"}, "Link", "Output format - Link/JSON/CDXJ") var arcsloc = flag.String([]string{"a", "-arcs"}, "http://git.io/archives", "Local/remote JSON file path/URL for list of archives") var logfile = flag.String([]string{"l", "-log"}, "", "Log file location - defaults to STDERR") var benchmark = flag.String([]string{"b", "-benchmark"}, "", "Benchmark file location - Defaults to Logfile") var contact = flag.String([]string{"c", "-contact"}, "@WebSciDL", "Email/URL/Twitter handle - used in the user-agent") var agent = flag.String([]string{"A", "-agent"}, fmt.Sprintf("%s:%s <{CONTACT}>", Name, Version), "User-agent string sent to archives") var host = flag.String([]string{"H", "-host"}, "localhost", "Host name - only used in web service mode") var proxy = flag.String([]string{"P", "-proxy"}, "http://{HOST}[:{PORT}]{ROOT}", "Proxy URL - defaults to host, port, and root") var root = flag.String([]string{"R", "-root"}, "/", "Service root path prefix") var static = flag.String([]string{"D", "-static"}, "", "Directory path to serve static assets from") var port = flag.Int([]string{"p", "-port"}, 1208, "Port number - only used in web service mode") var topk = flag.Int([]string{"k", "-topk"}, -1, "Aggregate only top k archives based on probability") var tolerance = flag.Int([]string{"F", "-tolerance"}, -1, "Failure tolerance limit for each archive") var verbose = flag.Bool([]string{"V", "-verbose"}, false, "Show Info and Profiling messages on STDERR") var version = flag.Bool([]string{"v", "-version"}, false, "Show name and version") var spoof = flag.Bool([]string{"S", "-spoof"}, false, "Spoof each request with a random user-agent")
Art = ` _____ _______ __ / \ _____ _____ / _____/______/ |___________ / Y Y \/ __ \/ \/ \ ___\__ \ _/ _ \_ _ \ / | | \ ___/ Y Y \ \_\ \/ __ | | |_| | | \/ \__/___\__/\____\__|_|__/\_______/_____|__|\___/|__| ` ) var ( logProfile *log.Logger logInfo *log.Logger logError *log.Logger ) var format = flag.String([]string{"f", "-format"}, "Link", "Output format - Link/JSON/CDXJ") var arcsloc = flag.String([]string{"a", "-arcs"}, "http://oduwsdl.github.io/memgator/archives.json", "Local/remote JSON file path/URL for list of archives") var logfile = flag.String([]string{"l", "-log"}, "", "Log file location - Defaults to STDERR") var profile = flag.String([]string{"P", "-profile"}, "", "Profile file location - Defaults to Logfile") var contact = flag.String([]string{"c", "-contact"}, "@WebSciDL", "Email/URL/Twitter handle - Used in the user-agent") var agent = flag.String([]string{"A", "-agent"}, fmt.Sprintf("%s:%s <{CONTACT}>", Name, Version), "User-agent string sent to archives") var host = flag.String([]string{"H", "-host"}, "localhost", "Host name - only used in web service mode") var servicebase = flag.String([]string{"s", "-service"}, "http://{HOST}[:{PORT}]", "Service base URL - default based on host & port") var mapbase = flag.String([]string{"m", "-timemap"}, "http://{SERVICE}/timemap", "TimeMap base URL - default based on service URL") var gatebase = flag.String([]string{"g", "-timegate"}, "http://{SERVICE}/timegate", "TimeGate base URL - default based on service URL") var port = flag.Int([]string{"p", "-port"}, 1208, "Port number - only used in web service mode") var topk = flag.Int([]string{"k", "-topk"}, -1, "Aggregate only top k archives based on probability") var verbose = flag.Bool([]string{"V", "-verbose"}, false, "Show Info and Profiling messages on STDERR") var version = flag.Bool([]string{"v", "-version"}, false, "Show name and version") var contimeout = flag.Duration([]string{"t", "-contimeout"}, time.Duration(5*time.Second), "Connection timeout for each archive") var hdrtimeout = flag.Duration([]string{"T", "-hdrtimeout"}, time.Duration(15*time.Second), "Header timeout for each archive")