Add framework for remote liveness check

This commit is contained in:
2024-01-16 11:24:06 -05:00
parent d7181b1cf6
commit 5337ea544b
2 changed files with 21 additions and 3 deletions

View File

@@ -21,6 +21,15 @@ func (r *Remotes) AddRemote(remote remote.Remote) {
*r = append(*r, remote)
}
func (r *Remotes) GetRemoteByHost(host string) remote.Remote {
for _, remote := range *r {
if remote.GetInfo().Host == host {
return remote
}
}
return nil
}
// Launches project streamsers for all remotes in goroutines
// returns slice of load.ProgressInfo
func (r *Remotes) StreamRemotes(opts *remote.RemoteQueryOpts) []*load.ProgressInfo {