feat: waiter CLI remote mode calls REST API directly for management commands

This commit is contained in:
root
2026-07-16 20:44:29 +08:00
parent 951d31cca0
commit 95d9591375
3 changed files with 172 additions and 7 deletions

View File

@ -41,6 +41,15 @@ func (s *State) Connected() bool {
return s.conn != nil
}
func (s *State) RemoteConn() *remoteConn {
s.mu.Lock()
defer s.mu.Unlock()
if rc, ok := s.conn.(*remoteConn); ok {
return rc
}
return nil
}
func (s *State) Send(line string) error {
s.mu.Lock()
c := s.conn