local_runtime

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package local_runtime handles the local plugin runtime management

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OnError

func OnError(id string, session_id string, listener func([]byte))

func OnGlobalEvent

func OnGlobalEvent(listener func(string, []byte))

Types

type LocalPluginRuntime

type LocalPluginRuntime struct {
	basic_runtime.BasicChecksum
	plugin_entities.PluginRuntime

	// proxy settings
	HttpProxy  string
	HttpsProxy 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
	PythonEnvInitTimeout  int
	HttpProxy             string
	HttpsProxy            string
	PipMirrorUrl          string
	PipPreferBinary       bool
	PipVerbose            bool
	PipExtraArgs          string
}

Jump to

Keyboard shortcuts

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