discoClient returns a client initialized with a server based from --src or from the configuration file if --src is blank. The returned client can then be used to discover the blobRoot and syncHandlers.
()
| 302 | // is blank. The returned client can then be used to discover |
| 303 | // the blobRoot and syncHandlers. |
| 304 | func (c *syncCmd) discoClient() *client.Client { |
| 305 | cl := newClient(c.src, client.OptionInsecure(c.insecureTLS)) |
| 306 | cl.Verbose = *cmdmain.FlagVerbose |
| 307 | cl.Logger = log.New(cmdmain.Stderr, "", log.LstdFlags) |
| 308 | return cl |
| 309 | } |
| 310 | |
| 311 | func enumerateAllBlobs(ctx context.Context, s blobserver.Storage, destc chan<- blob.SizedRef) error { |
| 312 | // Use *client.Client's support for enumerating all blobs if |
no test coverage detected