entities

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DisplayMode added in v0.5.0

type DisplayMode string
const (
	DisplayModeDesktop   DisplayMode = "desktop"
	DisplayModeNoDesktop DisplayMode = "nodesktop"
)

type EnvironmentInfo

type EnvironmentInfo struct {
	MATLABRoot string
	Version    string
}

type EvalRequest

type EvalRequest struct {
	Code string
}

type EvalResponse

type EvalResponse struct {
	ConsoleOutput string
	Images        [][]byte
}

type FEvalRequest

type FEvalRequest struct {
	Function   string
	Arguments  []string
	NumOutputs int
}

type FEvalResponse

type FEvalResponse struct {
	Outputs []any
}

type GlobalMATLAB

type GlobalMATLAB interface {
	Client(ctx context.Context, logger Logger) (MATLABSessionClient, error)
}

type LocalSessionDetails

type LocalSessionDetails struct {
	MATLABRoot             string
	IsStartingDirectorySet bool
	StartingDirectory      string
	ShowMATLABDesktop      bool
}

type LogLevel

type LogLevel string
const (
	LogLevelDebug LogLevel = "debug"
	LogLevelInfo  LogLevel = "info"
	LogLevelWarn  LogLevel = "warn"
	LogLevelError LogLevel = "error"
)

type Logger

type Logger interface {
	Debug(msg string)
	Info(msg string)
	Warn(msg string)
	Error(msg string)

	With(key string, value any) Logger
	WithError(err error) Logger
}

type MATLABManager

type MATLABManager interface {
	ListEnvironments(ctx context.Context, sessionLogger Logger) []EnvironmentInfo
	StartMATLABSession(ctx context.Context, sessionLogger Logger, startRequest SessionDetails) (SessionID, error)
	StopMATLABSession(ctx context.Context, sessionLogger Logger, sessionID SessionID) error
	GetMATLABSessionClient(ctx context.Context, sessionLogger Logger, sessionID SessionID) (MATLABSessionClient, error)
}

type MATLABSessionClient

type MATLABSessionClient interface {
	Eval(ctx context.Context, sessionLogger Logger, request EvalRequest) (EvalResponse, error)
	EvalWithCapture(ctx context.Context, logger Logger, input EvalRequest) (EvalResponse, error)
	FEval(ctx context.Context, sessionLogger Logger, request FEvalRequest) (FEvalResponse, error)
	Ping(ctx context.Context, sessionLogger Logger) PingResponse
}

type PingResponse added in v0.3.0

type PingResponse struct {
	IsAlive bool
}

type SessionDetails

type SessionDetails interface {
	// contains filtered or unexported methods
}

SessionDetails is an interface to disambiguate which type of MATLAB session to start.

type SessionID

type SessionID int

type Writer

type Writer interface {
	io.Writer
}

Jump to

Keyboard shortcuts

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