CopyTool is the interface for copy tool implementations.
| 44 | |
| 45 | // CopyTool is the interface for copy tool implementations. |
| 46 | type CopyTool interface { |
| 47 | // Name returns the name of the copy tool. |
| 48 | Name() string |
| 49 | // Command builds and returns the exec.Cmd for the copy operation. If opts is set, it is used for this invocation instead of the tool's Options set during initialization, without modifying the stored Options. |
| 50 | Command(ctx context.Context, paths []string, opts *Options) (*exec.Cmd, error) |
| 51 | // IsAvailableOnGuest checks if the tool is available on the specified guest instance. |
| 52 | IsAvailableOnGuest(ctx context.Context, paths []string) bool |
| 53 | } |
| 54 | |
| 55 | // New creates a new CopyTool based on the specified backend. |
| 56 | func New(ctx context.Context, backend string, paths []string, opts *Options) (CopyTool, error) { |
no outgoing calls
no test coverage detected