MCPcopy Index your code
hub / github.com/google/seesaw / run

Method run

engine/sync.go:532–549  ·  view source on GitHub ↗

run runs the synchronisation client.

()

Source from the content-addressed store, hash-verified

530
531// run runs the synchronisation client.
532func (sc *syncClient) run() {
533 for {
534 select {
535 case <-sc.stopped:
536 <-sc.start
537 log.Infof("Starting sync client...")
538 default:
539 sc.runOnce()
540 select {
541 // TODO: If we receive on quit inside runOnce, we have to wait the
542 // 5s here before enable will work again.
543 case <-time.After(5 * time.Second):
544 case <-sc.quit:
545 sc.stopped <- true
546 }
547 }
548 }
549}
550
551func (sc *syncClient) peerConfigured() bool {
552 return sc.engine.config.Peer.IPv4Addr != nil || sc.engine.config.Peer.IPv6Addr != nil

Callers

nothing calls this directly

Calls 1

runOnceMethod · 0.95

Tested by

no test coverage detected