ssh

package
v2.13.1-0...-077e46b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2021 License: BSD-3-Clause, MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatArgs

func FormatArgs(cmd string, args []string, needShell bool) (string, []string)

func GetExeAndArgs

func GetExeAndArgs(osEnv config.Environment, gitEnv config.Environment, meta *SSHMetadata, multiplexDesired bool) (exe string, baseargs []string, needShell bool)

Return the executable name for ssh on this machine and the base args Base args includes port settings, user/host, everything pre the command to execute

func GetLFSExeAndArgs

func GetLFSExeAndArgs(osEnv config.Environment, gitEnv config.Environment, meta *SSHMetadata, command, operation string, multiplexDesired bool) (string, []string)

Types

type Pktline

type Pktline interface {
	ReadPacketList() ([]string, error)
	ReadPacketTextWithLength() (string, int, error)
	WritePacket([]byte) error
	WritePacketText(string) error
	WriteDelim() error
	WriteFlush() error
}

type PktlineConnection

type PktlineConnection struct {
	// contains filtered or unexported fields
}

func (*PktlineConnection) End

func (conn *PktlineConnection) End() error

func (*PktlineConnection) Lock

func (conn *PktlineConnection) Lock()

func (*PktlineConnection) ReadStatus

func (conn *PktlineConnection) ReadStatus() (int, error)

func (*PktlineConnection) ReadStatusWithData

func (conn *PktlineConnection) ReadStatusWithData() (int, []string, io.Reader, error)

ReadStatusWithData reads a status, arguments, and any binary data. Note that the reader must be fully exhausted before invoking any other read methods.

func (*PktlineConnection) ReadStatusWithLines

func (conn *PktlineConnection) ReadStatusWithLines() (int, []string, []string, error)

ReadStatusWithLines reads a status, arguments, and a set of text lines.

func (*PktlineConnection) SendMessage

func (conn *PktlineConnection) SendMessage(command string, args []string) error

func (*PktlineConnection) SendMessageWithData

func (conn *PktlineConnection) SendMessageWithData(command string, args []string, data io.Reader) error

func (*PktlineConnection) SendMessageWithLines

func (conn *PktlineConnection) SendMessageWithLines(command string, args []string, lines []string) error

func (*PktlineConnection) Start

func (conn *PktlineConnection) Start() error

func (*PktlineConnection) Unlock

func (conn *PktlineConnection) Unlock()

type SSHMetadata

type SSHMetadata struct {
	UserAndHost string
	Port        string
	Path        string
}

type SSHTransfer

type SSHTransfer struct {
	// contains filtered or unexported fields
}

func NewSSHTransfer

func NewSSHTransfer(osEnv config.Environment, gitEnv config.Environment, meta *SSHMetadata, operation string) (*SSHTransfer, error)

func (*SSHTransfer) Connection

func (tr *SSHTransfer) Connection(n int) *PktlineConnection

Connection returns the nth connection (starting from 0) in this transfer instance or nil if there is no such item.

func (*SSHTransfer) ConnectionCount

func (tr *SSHTransfer) ConnectionCount() int

ConnectionCount returns the number of connections this object has.

func (*SSHTransfer) SetConnectionCount

func (tr *SSHTransfer) SetConnectionCount(n int) error

SetConnectionCount sets the number of connections to the specified number.

func (*SSHTransfer) SetConnectionCountAtLeast

func (tr *SSHTransfer) SetConnectionCountAtLeast(n int) error

SetConnectionCountAtLeast sets the number of connections to be not less than the specified number.

func (*SSHTransfer) Shutdown

func (tr *SSHTransfer) Shutdown() error

type TraceablePktline

type TraceablePktline struct {
	// contains filtered or unexported fields
}

func (*TraceablePktline) ReadPacketList

func (tp *TraceablePktline) ReadPacketList() ([]string, error)

func (*TraceablePktline) ReadPacketTextWithLength

func (tp *TraceablePktline) ReadPacketTextWithLength() (string, int, error)

func (*TraceablePktline) WriteDelim

func (tp *TraceablePktline) WriteDelim() error

func (*TraceablePktline) WriteFlush

func (tp *TraceablePktline) WriteFlush() error

func (*TraceablePktline) WritePacket

func (tp *TraceablePktline) WritePacket(b []byte) error

func (*TraceablePktline) WritePacketText

func (tp *TraceablePktline) WritePacketText(s string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL