diff --git a/pkg/remote/remote.go b/pkg/remote/remote.go index 23a623d63..f023190a6 100644 --- a/pkg/remote/remote.go +++ b/pkg/remote/remote.go @@ -14,23 +14,24 @@ import ( const RemoteTypeMShell = "mshell" +type Store struct { + Lock *sync.Mutex + Map map[string]*MShellProc +} + type MShellProc struct { - Lock *sync.Mutex - RemoteId string - WindowId string - RemoteName string - Cmd *exec.Cmd - Input *packet.PacketSender - Output *packet.PacketParser - Local bool - DoneCh chan bool - CurDir string - HomeDir string - User string - Host string - Env []string - Connected bool - RpcMap map[string]*RpcEntry + Lock *sync.Mutex + Remote *RemoteType + + // runtime + Connected bool + InitPk *packet.InitPacketType + Cmd *exec.Cmd + Input *packet.PacketSender + Output *packet.PacketParser + Local bool + DoneCh chan bool + RpcMap map[string]*RpcEntry } type RpcEntry struct { @@ -38,6 +39,10 @@ type RpcEntry struct { RespCh chan packet.RpcPacketType } +func LoadRemotes() { + +} + func LaunchMShell() (*MShellProc, error) { msPath, err := base.GetMShellPath() if err != nil { diff --git a/pkg/sstore/sstore.go b/pkg/sstore/sstore.go index b6f31dbf6..fa6c30643 100644 --- a/pkg/sstore/sstore.go +++ b/pkg/sstore/sstore.go @@ -93,10 +93,6 @@ type RemoteType struct { HostName string `json:"hostname"` LastConnectTs int64 `json:"lastconnectts"` ConnectOpts string `json:"connectopts"` - - // runtime - Connected bool `json:"connected"` - InitPk *packet.InitPacketType `json:"-"` } type CmdType struct {