 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func CheckConnStatus(blockId string) error
- func HandleAppendBlockFile(blockId string, blockFile string, data []byte) error
- func HandleTruncateBlockFile(blockId string) error
- func ResyncController(ctx context.Context, tabId string, blockId string, rtOpts *waveobj.RuntimeOpts, ...) error
- func StopAllBlockControllers()
- func StopBlockController(blockId string)
- func StopBlockControllerAndSetStatus(blockId string, newStatus string)
- type BlockController
- func (bc *BlockController) DoRunShellCommand(logCtx context.Context, rc *RunShellOpts, blockMeta waveobj.MetaMapType) error
- func (bc *BlockController) GetRuntimeStatus() *BlockControllerRuntimeStatus
- func (bc *BlockController) LockRunLock() bool
- func (bc *BlockController) SendInput(inputUnion *BlockInputUnion) error
- func (bc *BlockController) StopShellProc(shouldWait bool)
- func (bc *BlockController) UnlockRunLock()
- func (bc *BlockController) UpdateControllerAndSendUpdate(updateFn func() bool)
- func (bc *BlockController) WithLock(f func())
 
- type BlockControllerRuntimeStatus
- type BlockInputUnion
- type ConnUnion
- type RunShellOpts
Constants ¶
      View Source
      
  
    const ( BlockController_Shell = "shell" BlockController_Cmd = "cmd" )
      View Source
      
  
    const ( ConnType_Local = "local" ConnType_Wsl = "wsl" ConnType_Ssh = "ssh" )
      View Source
      
  
    const ( Status_Running = "running" Status_Done = "done" Status_Init = "init" )
      View Source
      
  
    const ( DefaultTermMaxFileSize = 256 * 1024 DefaultHtmlMaxFileSize = 256 * 1024 MaxInitScriptSize = 50 * 1024 )
      View Source
      
  
const DefaultTimeout = 2 * time.Second
    Variables ¶
This section is empty.
Functions ¶
func CheckConnStatus ¶
func HandleAppendBlockFile ¶
func HandleTruncateBlockFile ¶
func ResyncController ¶
func StopAllBlockControllers ¶
func StopAllBlockControllers()
func StopBlockController ¶
func StopBlockController(blockId string)
func StopBlockControllerAndSetStatus ¶ added in v0.10.0
Types ¶
type BlockController ¶
type BlockController struct {
	Lock              *sync.Mutex
	ControllerType    string
	TabId             string
	BlockId           string
	BlockDef          *waveobj.BlockDef
	CreatedHtmlFile   bool
	ShellProc         *shellexec.ShellProc
	ShellInputCh      chan *BlockInputUnion
	ShellProcStatus   string
	ShellProcExitCode int
	RunLock           *atomic.Bool
	StatusVersion     int
}
    func GetBlockController ¶
func GetBlockController(blockId string) *BlockController
func (*BlockController) DoRunShellCommand ¶
func (bc *BlockController) DoRunShellCommand(logCtx context.Context, rc *RunShellOpts, blockMeta waveobj.MetaMapType) error
func (*BlockController) GetRuntimeStatus ¶
func (bc *BlockController) GetRuntimeStatus() *BlockControllerRuntimeStatus
func (*BlockController) LockRunLock ¶ added in v0.10.0
func (bc *BlockController) LockRunLock() bool
func (*BlockController) SendInput ¶
func (bc *BlockController) SendInput(inputUnion *BlockInputUnion) error
func (*BlockController) StopShellProc ¶
func (bc *BlockController) StopShellProc(shouldWait bool)
func (*BlockController) UnlockRunLock ¶ added in v0.10.0
func (bc *BlockController) UnlockRunLock()
func (*BlockController) UpdateControllerAndSendUpdate ¶
func (bc *BlockController) UpdateControllerAndSendUpdate(updateFn func() bool)
func (*BlockController) WithLock ¶
func (bc *BlockController) WithLock(f func())
type BlockInputUnion ¶
type RunShellOpts ¶
 Click to show internal directories. 
   Click to hide internal directories.