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 Cmd struct {
Path string
Args []string
Env [][2]string
Dir string
Shell bool // when ssh-ing, try to start a shell instead of just executing a command (gives you working environment vars, etc)
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Host string
Context context.Context
// contains filtered or unexported fields
}
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
Verbose bool
}
Click to show internal directories.
Click to hide internal directories.