MCPcopy
hub / github.com/perkeep/perkeep / discoClient

Method discoClient

cmd/pk/sync.go:304–309  ·  view source on GitHub ↗

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.

()

Source from the content-addressed store, hash-verified

302// is blank. The returned client can then be used to discover
303// the blobRoot and syncHandlers.
304func (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
311func enumerateAllBlobs(ctx context.Context, s blobserver.Storage, destc chan<- blob.SizedRef) error {
312 // Use *client.Client's support for enumerating all blobs if

Callers 3

storageFromParamMethod · 0.95
dumpConfigMethod · 0.95
syncAllMethod · 0.95

Calls 2

OptionInsecureFunction · 0.92
newClientFunction · 0.70

Tested by

no test coverage detected