local_runtime

package
v0.0.0-...-e06565c Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package local_runtime handles the local plugin runtime management

Index

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 (*LocalPluginRuntime) InitEnvironment

func (r *LocalPluginRuntime) InitEnvironment() error

func (*LocalPluginRuntime) InitPythonEnvironment

func (p *LocalPluginRuntime) InitPythonEnvironment() error

func (*LocalPluginRuntime) Listen

func (*LocalPluginRuntime) StartPlugin

func (r *LocalPluginRuntime) StartPlugin() error

StartPlugin starts the plugin and manages its lifecycle

func (*LocalPluginRuntime) Stop

func (r *LocalPluginRuntime) Stop()

Stop stops the plugin

func (*LocalPluginRuntime) Type

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

type StdioHolderConfig struct {
	StdoutBufferSize    int
	StdoutMaxBufferSize int
}

Jump to

Keyboard shortcuts

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