Versions in this module Expand all Collapse all v0 v0.2.1 Feb 9, 2024 Changes in this version + const CONTROLLED_SUBCMD + const CONTROL_SERVER_LOG_SRC + const GRACEFUL_CANCELLATION_TIMEOUT + const HEARTBEAT_INTERVAL + const INIT_PROCESS_PID + const LOCAL_WS_HANDSHAKE_TIMEOUT + const MAX_CONTROLLED_PROCESS_CONNECTION_WAITING_TIME + const MAX_RECONNECT_ATTEMPT_COUNT + const PROCESS_TOKEN_BYTE_LENGTH + const PROCESS_TOKEN_HEADER + var ErrAlreadyExecuting = errors.New("already executing") + var ErrControlLoopEnd = errors.New("control loop end") + var ErrOrphanProcess = errors.New("orphan process") + var ErrProcessAlreadyConnected = errors.New("controlled process is already connected to the control server") + var ErrProcessDidNotConnect = errors.New("controlled process did not connect to the control server") + var ErrTooManyReconnectAttempts = errors.New("too many reconnect attemps") + var PROCESS_TOKEN_ENCODED_BYTE_LENGTH = hex.EncodedLen(PROCESS_TOKEN_BYTE_LENGTH) + func DecodeMessage(p []byte, ptr any) error + func EncodeMessage(msg Message) ([]byte, error) + func MustEncodeMessage(msg Message) []byte + func RegisterTypesInGob() + func RestrictProcessAccess(ctx *core.Context, config ProcessRestrictionConfig) + type AckMsg struct + AcknowledgedMessage ulid.ULID + type AllStoppedEvent struct + type ControlClient struct + func ConnectToProcessControlServer(ctx *core.Context, u *url.URL, token ControlledProcessToken) (*ControlClient, error) + func (c *ControlClient) Conn() *ws_ns.WebsocketConnection + func (c *ControlClient) StartControl() error + type ControlServer struct + func NewControlServer(ctx *core.Context, config ControlServerConfig) (*ControlServer, error) + func (s *ControlServer) CreateControlledProcess(grantedPerms, forbiddenPerms []core.Permission) (*ControlledProcess, error) + func (s *ControlServer) Start() error + type ControlServerConfig struct + InoxBinaryPath string + Port uint16 + func (c ControlServerConfig) Check() error + type ControlledProcess struct + func (p *ControlledProcess) Stop(ctx *core.Context) + type ControlledProcessToken string + func ControlledProcessTokenFrom(s string) (ControlledProcessToken, bool) + func MakeControlledProcessToken() ControlledProcessToken + type ExternalFilesystem struct + func (*ExternalFilesystem) Chroot(path string) (billy.Filesystem, error) + func (*ExternalFilesystem) Create(filename string) (billy.File, error) + func (*ExternalFilesystem) Join(elem ...string) string + func (*ExternalFilesystem) Lstat(filename string) (fs.FileInfo, error) + func (*ExternalFilesystem) MkdirAll(filename string, perm fs.FileMode) error + func (*ExternalFilesystem) Open(filename string) (billy.File, error) + func (*ExternalFilesystem) OpenFile(filename string, flag int, perm fs.FileMode) (billy.File, error) + func (*ExternalFilesystem) ReadDir(path string) ([]fs.FileInfo, error) + func (*ExternalFilesystem) Readlink(link string) (string, error) + func (*ExternalFilesystem) Remove(filename string) error + func (*ExternalFilesystem) Rename(oldpath string, newpath string) error + func (*ExternalFilesystem) Root() string + func (*ExternalFilesystem) Stat(filename string) (fs.FileInfo, error) + func (*ExternalFilesystem) Symlink(target string, link string) error + func (*ExternalFilesystem) TempFile(dir string, prefix string) (billy.File, error) + func (fls *ExternalFilesystem) Absolute(path string) (string, error) + type LaunchAppResponse struct + Error error + Request ulid.ULID + type LaunchApplicationRequest struct + AppDir string + type Message struct + Inner any + ULID ulid.ULID + type ProcessRestrictionConfig struct + AllowBrowserAccess bool + BrowserBinPath string + ForceAllowDNS bool + type StopAllRequest struct + type StopAllResponse struct + AlreadyStopped bool