Downstream is the implementation for the downstream server
| 119 | |
| 120 | // Downstream is the implementation for the downstream server |
| 121 | type Downstream struct { |
| 122 | remote.UnimplementedDownstreamServer |
| 123 | |
| 124 | options *DownstreamOptions |
| 125 | |
| 126 | // ignore matcher is the ignore matcher which matches against excluded files and paths |
| 127 | ignoreMatcher ignoreparser.IgnoreParser |
| 128 | |
| 129 | // watchedFiles is a memory map of the previous state of the changes function |
| 130 | watchedFiles map[string]*remote.Change |
| 131 | |
| 132 | // events is the event stream if we watch for changes |
| 133 | events chan notify.EventInfo |
| 134 | |
| 135 | // changesMutex is used to protect changes |
| 136 | changesMutex sync.Mutex |
| 137 | |
| 138 | // changes is a map of changed paths |
| 139 | changes map[string]bool |
| 140 | |
| 141 | // lastRescan is used to rescan the complete path from time to time |
| 142 | lastRescan *time.Time |
| 143 | |
| 144 | // ping is used to determine if we still have an alive connection |
| 145 | ping *pingtimeout.PingTimeout |
| 146 | } |
| 147 | |
| 148 | // Download sends the file at the temp download location to the client |
| 149 | func (d *Downstream) Download(stream remote.Downstream_DownloadServer) error { |
nothing calls this directly
no outgoing calls
no test coverage detected