Documentation
¶
Overview ¶
MIT License
Copyright (c) 2020 xzx.weiliang ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- func ParallelScp(sftpItem ScpItem, servers []runner.ServerInternal) chan error
- func Scp(sftpItem *ScpItem) error
- type IOCopy64Err
- type NewSftpClientErr
- type ScpItem
- func (sftp *ScpItem) IOCopy64(size int64, srcPath string, dstPath string, hostSign string, ...) (err error)
- func (sftp *ScpItem) NewSftpClient(server runner.ServerInternal, timeout time.Duration) (err error)
- func (sftp *ScpItem) SftpChmod(dstPath string, mode os.FileMode) error
- func (sftp *ScpItem) SftpCreate(path string) (err error)
- type SftpChmodErr
- type SftpCreateErr
- type SftpExecutor
- type SftpInterface
- type SftpItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParallelScp ¶
func ParallelScp(sftpItem ScpItem, servers []runner.ServerInternal) chan error
ParallelScp 并发拷贝 todo: Modify
Types ¶
type IOCopy64Err ¶
func (IOCopy64Err) Error ¶
func (ioCopy64Err IOCopy64Err) Error() string
type NewSftpClientErr ¶
func (NewSftpClientErr) Error ¶
func (newSftpClientErr NewSftpClientErr) Error() string
type ScpItem ¶
type ScpItem struct { Logger *logrus.Logger SftpInterface SftpExecutor SftpConnectTimeout time.Duration // contains filtered or unexported fields }
ScpItem 定义跨主机拷贝属性
func (*ScpItem) NewSftpClient ¶
NewSftpClient sftp客户端
func (*ScpItem) SftpCreate ¶
type SftpChmodErr ¶
func (SftpChmodErr) Error ¶
func (chmodErr SftpChmodErr) Error() string
type SftpCreateErr ¶
func (SftpCreateErr) Error ¶
func (sftpCreateErr SftpCreateErr) Error() string
type SftpExecutor ¶
type SftpInterface ¶
type SftpInterface interface { NewSftpClient(server runner.ServerInternal, timeout time.Duration) (err error) SftpCreate(path string) (err error) SftpChmod(dstPath string, mode os.FileMode) error IOCopy64(size int64, srcPath string, dstPath string, hostSign string, logger *logrus.Logger) (err error) }