Documentation
¶
Overview ¶
Package client provides the client interface for 'exec'
Index ¶
- Variables
- func ExecRemoteCommand(ctx context.Context, conn *proxy.Conn, binary string, args ...string) (*pb.ExecResponse, error)deprecated
- func ExecRemoteCommandMany(ctx context.Context, conn *proxy.Conn, binary string, args ...string) ([]*pb.RunManyResponse, error)
- func ExecRemoteCommandManyWithOpts(ctx context.Context, conn *proxy.Conn, binary string, args []string, ...) ([]*pb.RunManyResponse, error)
- func ExecRemoteCommandWithOpts(ctx context.Context, conn *proxy.Conn, binary string, args []string, ...) (*pb.ExecResponse, error)
- type ExecRemoteOption
Constants ¶
This section is empty.
Variables ¶
var DefaultStreaming = false
Default value for using streaming exec. This is exposed so that clients can set a default that works for their environment. StreamingExec was added after Exec, so policies or sansshell nodes may not have been updated to support streaming.
Functions ¶
func ExecRemoteCommand
deprecated
func ExecRemoteCommand(ctx context.Context, conn *proxy.Conn, binary string, args ...string) (*pb.ExecResponse, error)
ExecRemoteCommand is a helper function for execing a command on a remote host using a proxy.Conn. If the conn is defined for >1 targets this will return an error.
Deprecated: Use ExecRemoteCommandWithOpts instead.
func ExecRemoteCommandMany ¶ added in v1.23.6
func ExecRemoteCommandMany(ctx context.Context, conn *proxy.Conn, binary string, args ...string) ([]*pb.RunManyResponse, error)
ExecRemoteCommandMany is a helper function for execing a command on one or remote hosts using a proxy.Conn. `binary` refers to the absolute path of the binary file on the remote host.
// Deprecated: Use ExecRemoteCommandManyWithOpts instead.
func ExecRemoteCommandManyWithOpts ¶ added in v1.39.0
func ExecRemoteCommandManyWithOpts(ctx context.Context, conn *proxy.Conn, binary string, args []string, opts ...ExecRemoteOption) ([]*pb.RunManyResponse, error)
ExecRemoteCommandManyWithOpts is a helper function for execing a command on one or remote hosts with provided opts using a proxy.Conn. `binary` refers to the absolute path of the binary file on the remote host.
func ExecRemoteCommandWithOpts ¶ added in v1.39.0
func ExecRemoteCommandWithOpts(ctx context.Context, conn *proxy.Conn, binary string, args []string, opts ...ExecRemoteOption) (*pb.ExecResponse, error)
ExecRemoteCommandWithOpts is a helper function for execing a command on a remote host with provided opts using a proxy.Conn. If the conn is defined for >1 targets this will return an error.
Types ¶
type ExecRemoteOption ¶ added in v1.39.0
type ExecRemoteOption func(*execRemoteOptions)
func ExecAsUser ¶ added in v1.39.0
func ExecAsUser(user string) ExecRemoteOption