runtime

package
v0.8.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug bool
)
View Source
var (
	ErrKclvmRootNotFound = errors.New("kclvm root not found, please ensure kcl is in your PATH")
)

Functions

func GetKclvmPath

func GetKclvmPath() (string, error)

GetKclvmPath return kclvm/python3 executable path, return error if not found.

func GetKclvmRoot

func GetKclvmRoot() (string, error)

GetKclvmRoot return kclvm root directory, return error if kclvm not found.

func InitKclvmRoot

func InitKclvmRoot(kclvmRoot string)

func InitRuntime

func InitRuntime(maxProc int)

func MustGetKclvmPath

func MustGetKclvmPath() string

MustGetKclvmPath return kclvm/python3 executable path, panic if not found.

func MustGetKclvmRoot

func MustGetKclvmRoot() string

GetKclvmRoot return kclvm root directory, panic if kclvm not found.

Types

type BuiltinServiceClient

type BuiltinServiceClient struct {
	*Runtime
}

func (*BuiltinServiceClient) ListMethod

func (p *BuiltinServiceClient) ListMethod(args *gpyrpc.ListMethod_Args) (resp *gpyrpc.ListMethod_Result, err error)

func (*BuiltinServiceClient) Ping

func (p *BuiltinServiceClient) Ping(args *gpyrpc.Ping_Args) (resp *gpyrpc.Ping_Result, err error)

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func GetPyRuntime

func GetPyRuntime() *Runtime

func GetRuntime

func GetRuntime() *Runtime

func NewRuntime

func NewRuntime(maxProc int, exe string, args ...string) *Runtime

func (*Runtime) Close

func (p *Runtime) Close() error

func (*Runtime) DoTask

func (p *Runtime) DoTask(task func(c *rpc.Client, stderr io.Reader))

func (*Runtime) Start

func (p *Runtime) Start()

Jump to

Keyboard shortcuts

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