MCPcopy Create free account
hub / github.com/Driver-C/tryssh / tryCopyWithCache

Method tryCopyWithCache

pkg/control/scp.go:90–102  ·  view source on GitHub ↗
(user string, targetServer *config.ServerListConfig)

Source from the content-addressed store, hash-verified

88}
89
90func (cc *ScpController) tryCopyWithCache(user string, targetServer *config.ServerListConfig) {
91 lan := &launcher.ScpLauncher{
92 SSHConnector: *launcher.GetSSHConnectorFromConfig(targetServer),
93 Src: cc.source,
94 Dest: cc.destination,
95 Recursive: cc.recursive,
96 }
97 lan.SSHTimeout = sshClientTimeoutWhenLogin
98 if !lan.Launch() {
99 utils.Errorf("Failed to log in with cached information. Start trying to login again.\n\n")
100 cc.tryCopyWithoutCache(user)
101 }
102}
103
104func (cc *ScpController) tryCopyWithoutCache(user string) {
105 combinations := config.GenerateCombination(cc.destIP, user, cc.configuration)

Callers 1

TryCopyMethod · 0.95

Calls 4

LaunchMethod · 0.95
tryCopyWithoutCacheMethod · 0.95
ErrorfFunction · 0.92

Tested by

no test coverage detected