Documentation
¶
Overview ¶
package rio is an abstraction for IO operations that may be performed locally, or remotely via golang.org/x/crypto/ssh.
Index ¶
- type Cmd
- type Config
- func (config *Config) Command(ctx context.Context, path string, args ...string) *Cmd
- func (config *Config) Create(path string) (io.WriteCloser, error)
- func (config *Config) Open(path string) (io.ReadCloser, error)
- func (config *Config) ReadFile(path string) ([]byte, error)
- func (config *Config) Remove(path string) error
- func (config *Config) Stat(path string) (os.FileInfo, error)
- type FileInfo
- type SSHReader
- type SSHWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Config ¶
type Config struct {
// Pool is an SSH connection pool. If nil, local mode is used on the current host.
Pool *sshpool.Pool
// Host to connect to. Leave blank for local mode.
Host string
// User to switch to. If blank, currently running user is used, or default user of SSH
// connection for remote connections. If specified, sudo will be used to attempt to
// switch to that user.
Sudo string
Verbose bool
}
Click to show internal directories.
Click to hide internal directories.