Documentation
¶
Overview ¶
Package local_runtime handles the local plugin runtime management
Index ¶
- Constants
- type LocalPluginRuntime
- func (r *LocalPluginRuntime) Identity() (plugin_entities.PluginUniqueIdentifier, error)
- func (r *LocalPluginRuntime) InitEnvironment() error
- func (p *LocalPluginRuntime) InitPythonEnvironment() error
- func (r *LocalPluginRuntime) Listen(session_id string) *entities.Broadcast[plugin_entities.SessionMessage]
- func (r *LocalPluginRuntime) StartPlugin() error
- func (r *LocalPluginRuntime) Stop()
- func (r *LocalPluginRuntime) Type() plugin_entities.PluginRuntimeType
- func (r *LocalPluginRuntime) Wait() (<-chan bool, error)
- func (r *LocalPluginRuntime) WaitStarted() <-chan bool
- func (r *LocalPluginRuntime) WaitStopped() <-chan bool
- func (r *LocalPluginRuntime) Write(session_id string, action access_types.PluginAccessAction, data []byte)
- type LocalPluginRuntimeConfig
- type StdioHolderConfig
Constants ¶
View Source
const ( MAX_ERR_MSG_LEN = 1024 MAX_HEARTBEAT_INTERVAL = 120 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalPluginRuntime ¶
type LocalPluginRuntime struct { basic_runtime.BasicChecksum plugin_entities.PluginRuntime // proxy settings HttpProxy string HttpsProxy string NoProxy string // contains filtered or unexported fields }
func NewLocalPluginRuntime ¶
func NewLocalPluginRuntime(config LocalPluginRuntimeConfig) *LocalPluginRuntime
func (*LocalPluginRuntime) Identity ¶
func (r *LocalPluginRuntime) Identity() (plugin_entities.PluginUniqueIdentifier, error)
func (*LocalPluginRuntime) InitEnvironment ¶
func (r *LocalPluginRuntime) InitEnvironment() error
func (*LocalPluginRuntime) InitPythonEnvironment ¶
func (p *LocalPluginRuntime) InitPythonEnvironment() error
func (*LocalPluginRuntime) Listen ¶
func (r *LocalPluginRuntime) Listen(session_id string) *entities.Broadcast[plugin_entities.SessionMessage]
func (*LocalPluginRuntime) StartPlugin ¶
func (r *LocalPluginRuntime) StartPlugin() error
StartPlugin starts the plugin and manages its lifecycle
func (*LocalPluginRuntime) Type ¶
func (r *LocalPluginRuntime) Type() plugin_entities.PluginRuntimeType
Type returns the runtime type of the plugin
func (*LocalPluginRuntime) Wait ¶
func (r *LocalPluginRuntime) Wait() (<-chan bool, error)
Wait returns a channel that will be closed when the plugin stops
func (*LocalPluginRuntime) WaitStarted ¶
func (r *LocalPluginRuntime) WaitStarted() <-chan bool
WaitStarted returns a channel that will receive true when the plugin starts
func (*LocalPluginRuntime) WaitStopped ¶
func (r *LocalPluginRuntime) WaitStopped() <-chan bool
WaitStopped returns a channel that will receive true when the plugin stops
func (*LocalPluginRuntime) Write ¶
func (r *LocalPluginRuntime) Write(session_id string, action access_types.PluginAccessAction, data []byte)
type LocalPluginRuntimeConfig ¶
type LocalPluginRuntimeConfig struct { PythonInterpreterPath string UvPath string PythonEnvInitTimeout int PythonCompileAllExtraArgs string HttpProxy string HttpsProxy string NoProxy string PipMirrorUrl string PipPreferBinary bool PipVerbose bool PipExtraArgs string StdoutBufferSize int StdoutMaxBufferSize int }
type StdioHolderConfig ¶
Click to show internal directories.
Click to hide internal directories.