Documentation
¶
Index ¶
- type Handler
- func (p *Handler) CloseStdin() error
- func (p *Handler) Pid() uint32
- func (p *Handler) ResizeTty(size *pty.Winsize) error
- func (p *Handler) SendSignal(signal syscall.Signal) error
- func (p *Handler) Start(requestTimeout time.Duration) (uint32, error)
- func (p *Handler) Wait()
- func (p *Handler) WriteStdin(data []byte) error
- func (p *Handler) WriteTty(data []byte) error
- type MultiplexedChannel
- type ProcessExit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
Config *rpc.ProcessConfig
Tag *string
DataEvent *MultiplexedChannel[rpc.ProcessEvent_Data]
EndEvent *MultiplexedChannel[rpc.ProcessEvent_End]
// contains filtered or unexported fields
}
func (*Handler) CloseStdin ¶
CloseStdin closes the stdin pipe to signal EOF to the process. Only works for non-PTY processes.
func (*Handler) WriteStdin ¶
type MultiplexedChannel ¶
type MultiplexedChannel[T any] struct { Source chan T // contains filtered or unexported fields }
MultiplexedChannel fans out values written to Source to every subscriber obtained via Fork. Each subscriber send is guarded by a done channel so a cancelled consumer can never wedge the fan-out loop.
func NewMultiplexedChannel ¶
func NewMultiplexedChannel[T any](buffer int) *MultiplexedChannel[T]
func (*MultiplexedChannel[T]) Fork ¶
func (m *MultiplexedChannel[T]) Fork() (chan T, func())
Fork registers a new subscriber and returns its channel plus a cancel func. If Source is already closed it returns a pre-closed channel and a no-op cancel. The channel is bidirectional for backwards compat with start.go which writes a bootstrap event into it; new callers should treat it as receive-only.
Click to show internal directories.
Click to hide internal directories.