handler

package
v0.0.0-...-43ce26c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 New

func New(user *user.User, req *rpc.StartRequest, logger *zerolog.Logger, envVars *utils.Map[string, string]) (*Handler, error)

func (*Handler) Pid

func (p *Handler) Pid() uint32

This method must be called only after the process has been started

func (*Handler) ResizeTty

func (p *Handler) ResizeTty(size *pty.Winsize) error

func (*Handler) SendSignal

func (p *Handler) SendSignal(signal syscall.Signal) error

func (*Handler) Start

func (p *Handler) Start() (uint32, error)

func (*Handler) Wait

func (p *Handler) Wait()

func (*Handler) WriteStdin

func (p *Handler) WriteStdin(data []byte) error

func (*Handler) WriteTty

func (p *Handler) WriteTty(data []byte) error

type MultiplexedChannel

type MultiplexedChannel[T any] struct {
	Source chan T
	// contains filtered or unexported fields
}

func NewMultiplexedChannel

func NewMultiplexedChannel[T any](buffer int) *MultiplexedChannel[T]

func (*MultiplexedChannel[T]) Fork

func (m *MultiplexedChannel[T]) Fork() (chan T, func())

type ProcessExit

type ProcessExit struct {
	Error  *string
	Status string
	Exited bool
	Code   int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL