Versions in this module Expand all Collapse all v0 v0.7.6 Jun 15, 2024 Changes in this version + const CircBufSize + const DefaultMaxPtySize + const DefaultTerm + const MaxInputDataSize + const NewStateDiffSizeThreshold + const PrintPingPacket + const PtyReadBufSize + const RemoteConnectTimeout + const RemoteTermCols + const RemoteTermRows + const RemoteTypeWaveshell + const RpcIterChannelSize + const StatusConnected + const StatusConnecting + const StatusDisconnected + const StatusError + const SudoTimeoutTime + const WaveshellServerCommandFmt + func AddRemote(ctx context.Context, r *sstore.RemoteType, shouldStart bool) error + func ArchiveRemote(ctx context.Context, remoteId string) error + func CanComplete(remoteType string) bool + func ConnectToClient(connCtx context.Context, opts *sstore.SSHOpts, remoteDisplayName string) (*ssh.Client, error) + func DialContext(ctx context.Context, network string, addr string, config *ssh.ClientConfig) (*ssh.Client, error) + func EvalPrompt(promptFmt string, vars map[string]string, state *packet.ShellState) string + func GetRemoteCopyById(remoteId string) *sstore.RemoteType + func GetRemoteMap() map[string]*WaveshellProc + func LoadRemoteById(ctx context.Context, remoteId string) error + func LoadRemotes(ctx context.Context) error + func MakeLocalWaveshellCommandStr(isSudo bool) (string, error) + func MakeServerCommandStr() string + func NumRemotes() int + func ReadRemotePty(ctx context.Context, remoteId string) (int64, []byte, error) + func RunCommand(ctx context.Context, rcOpts RunCommandOpts, runPacket *packet.RunPacketType) (rtnCmd *sstore.CmdType, rtnCallback func(), rtnErr error) + func SendRemoteInput(pk *scpacket.RemoteInputPacketType) error + func SendSignalToCmd(ctx context.Context, cmd *sstore.CmdType, sig string) error + type CircleLog struct + Lock *sync.Mutex + Log []string + MaxSize int + StartPos int + func MakeCircleLog(maxSize int) *CircleLog + func (l *CircleLog) Add(s string) + func (l *CircleLog) Addf(sfmt string, args ...interface{}) + func (l *CircleLog) GetEntries() []string + type CommandInputSink interface + HandleInput func(feInput *scpacket.FeInputPacketType) error + type ReinitCommandSink struct + Remote *WaveshellProc + ReqId string + func (rcs *ReinitCommandSink) HandleInput(feInput *scpacket.FeInputPacketType) error + type RemoteRuntimeState = sstore.RemoteRuntimeState + func GetAllRemoteRuntimeState() []*RemoteRuntimeState + func ResolveRemoteRef(remoteRef string) *RemoteRuntimeState + type RunCmdType struct + CK base.CommandKey + EphemeralOpts *ephemeral.EphemeralRunOpts + RemotePtr sstore.RemotePtrType + RunPacket *packet.RunPacketType + ScreenId string + SessionId string + type RunCommandOpts struct + EphemeralOpts *ephemeral.EphemeralRunOpts + NoCreateCmdPtyFile bool + RemotePtr sstore.RemotePtrType + ScreenId string + SessionId string + StatePtr *packet.ShellStatePtr + type SshKeywords struct + BatchMode bool + HostName string + IdentityFile []string + KbdInteractiveAuthentication bool + PasswordAuthentication bool + Port string + PreferredAuthentications []string + PubkeyAuthentication bool + User string + type Store struct + CmdWaitMap map[base.CommandKey][]func() + Lock *sync.Mutex + Map map[string]*WaveshellProc + var GlobalStore *Store + type UserInputCancelError struct + Err error + func (uice UserInputCancelError) Error() string + type WaveshellProc struct + Client *ssh.Client + CommandInputMap map[base.CommandKey]CommandInputSink + ControllingPty *os.File + DataPosMap *utilfn.SyncMap[base.CommandKey, int64] + Err error + ErrNoInitPk bool + InitPkShellType string + InstallCancelFn context.CancelFunc + InstallErr error + InstallStatus string + Lock *sync.Mutex + MakeClientCancelFn context.CancelFunc + MakeClientDeadline *time.Time + NeedsWaveshellUpgrade bool + NumTryConnect int + PendingStateCmds map[pendingStateKey]base.CommandKey + PtyBuffer *circbuf.Buffer + Remote *sstore.RemoteType + RemoteId string + RunningCmds map[base.CommandKey]*RunCmdType + ServerProc *shexec.ClientProc + StateMap *server.ShellStateMap + Status string + UName string + func GetLocalRemote() *WaveshellProc + func GetRemoteByArg(arg string) *WaveshellProc + func GetRemoteById(remoteId string) *WaveshellProc + func MakeWaveshell(r *sstore.RemoteType) *WaveshellProc + func (wsh *WaveshellProc) AddRunningCmd(rct *RunCmdType) + func (wsh *WaveshellProc) CancelInstall() + func (wsh *WaveshellProc) ChangeSudoTimeout(deltaTime int64) + func (wsh *WaveshellProc) CheckPasswordRequested(ctx context.Context, requiresPassword chan bool) + func (wsh *WaveshellProc) ClearCachedSudoPw() + func (wsh *WaveshellProc) Disconnect(force bool) + func (wsh *WaveshellProc) GetDisplayName() string + func (wsh *WaveshellProc) GetInstallStatus() string + func (wsh *WaveshellProc) GetNumRunningCommands() int + func (wsh *WaveshellProc) GetRemoteCopy() sstore.RemoteType + func (wsh *WaveshellProc) GetRemoteId() string + func (wsh *WaveshellProc) GetRemoteName() string + func (wsh *WaveshellProc) GetRemoteRuntimeState() RemoteRuntimeState + func (wsh *WaveshellProc) GetRunningCmd(ck base.CommandKey) *RunCmdType + func (wsh *WaveshellProc) GetShellPref() string + func (wsh *WaveshellProc) GetShellType() string + func (wsh *WaveshellProc) GetStatus() string + func (wsh *WaveshellProc) GetUName() string + func (wsh *WaveshellProc) HandleFeInput(inputPk *scpacket.FeInputPacketType) error + func (wsh *WaveshellProc) IsCmdRunning(ck base.CommandKey) bool + func (wsh *WaveshellProc) IsConnected() bool + func (wsh *WaveshellProc) IsLocal() bool + func (wsh *WaveshellProc) IsSudo() bool + func (wsh *WaveshellProc) KillRunningCommandAndWait(ctx context.Context, ck base.CommandKey) error + func (wsh *WaveshellProc) Launch(interactive bool) + func (wsh *WaveshellProc) NotifyRemoteUpdate() + func (wsh *WaveshellProc) PacketRpc(ctx context.Context, pk packet.RpcPacketType) (*packet.ResponsePacketType, error) + func (wsh *WaveshellProc) PacketRpcIter(ctx context.Context, pk packet.RpcPacketType) (*packet.RpcResponseIter, error) + func (wsh *WaveshellProc) PacketRpcRaw(ctx context.Context, pk packet.RpcPacketType) (packet.RpcResponsePacketType, error) + func (wsh *WaveshellProc) ProcessPackets() + func (wsh *WaveshellProc) ReInit(ctx context.Context, ck base.CommandKey, shellType string, dataFn func([]byte), ...) (rtnPk *packet.ShellStatePacketType, rtnErr error) + func (wsh *WaveshellProc) RemoveRunningCmd(ck base.CommandKey) + func (wsh *WaveshellProc) ResetDataPos(ck base.CommandKey) + func (wsh *WaveshellProc) RunInstall(autoInstall bool) + func (wsh *WaveshellProc) RunPasswordReadLoop(cmdPty *os.File) + func (wsh *WaveshellProc) RunPtyReadLoop(cmdPty *os.File) + func (wsh *WaveshellProc) SendFileData(dataPk *packet.FileDataPacketType) error + func (wsh *WaveshellProc) SendPassword(pw string) + func (wsh *WaveshellProc) StreamFile(ctx context.Context, streamPk *packet.StreamFilePacketType) (*packet.RpcResponseIter, error) + func (wsh *WaveshellProc) TryAutoConnect() error + func (wsh *WaveshellProc) UpdateRemote(ctx context.Context, editMap map[string]interface{}) error + func (wsh *WaveshellProc) WaitAndSendPassword(pw string) + func (wsh *WaveshellProc) WaitAndSendPasswordNew(pw string) + func (wsh *WaveshellProc) WithLock(fn func()) + func (wsh *WaveshellProc) WriteFile(ctx context.Context, writePk *packet.WriteFilePacketType) (*packet.RpcResponseIter, error) + func (wsh *WaveshellProc) WriteToPtyBuffer(strFmt string, args ...interface{})