engine

package
v0.0.0-...-2efa35c Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	RoutingIndex map[string]*SpaceRouteIndexItem
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(opt EngineOption) *Engine

func (*Engine) EmitActionEvent

func (e *Engine) EmitActionEvent(opts *xtypes.ActionEventOptions) error

func (*Engine) EmitHttpEvent

func (e *Engine) EmitHttpEvent(opts *xtypes.HttpEventOptions) error

func (*Engine) GetCapabilityDefinitions

func (e *Engine) GetCapabilityDefinitions() []caphub.CapabilityDefination

func (*Engine) GetCapabilityHub

func (e *Engine) GetCapabilityHub() any

func (*Engine) GetDebugData

func (e *Engine) GetDebugData() map[string]any

func (*Engine) GetRepoHub

func (e *Engine) GetRepoHub() *repohub.RepoHub

func (*Engine) LoadRoutingIndex

func (e *Engine) LoadRoutingIndex()

func (*Engine) LoadRoutingIndexForPackages

func (e *Engine) LoadRoutingIndexForPackages(installedId int64)

func (*Engine) PluginApi

func (e *Engine) PluginApi(ctx *gin.Context)

func (*Engine) PublishEvent

func (e *Engine) PublishEvent(opts *xtypes.EventOptions) error

func (*Engine) RefreshEventIndex

func (e *Engine) RefreshEventIndex()

func (*Engine) ServeCapability

func (e *Engine) ServeCapability(ctx *gin.Context)

func (*Engine) ServeCapabilityRoot

func (e *Engine) ServeCapabilityRoot(ctx *gin.Context)

func (*Engine) ServePluginFile

func (e *Engine) ServePluginFile(ctx *gin.Context)

func (*Engine) ServeSpaceFile

func (e *Engine) ServeSpaceFile(ctx *gin.Context)

func (*Engine) SpaceApi

func (e *Engine) SpaceApi(ctx *gin.Context)

func (*Engine) SpaceInfo

func (e *Engine) SpaceInfo(nsKey string, hostName string) (*SpaceInfo, error)

func (*Engine) Start

func (e *Engine) Start(app xtypes.App) error

type EngineOption

type EngineOption struct {
	DB            datahub.Database
	WorkingFolder string
	Logger        *slog.Logger
	Repos         []xtypes.RepoOptions
	HttpPort      int
}

type PluginRouteIndexItem

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

type RunningExec

type RunningExec struct {
	Executor         xtypes.Executor
	SpaceId          int64
	PackageVersionId int64
	InstalledId      int64
}

type Runtime

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

func (*Runtime) ClearExecs

func (r *Runtime) ClearExecs(spaceIds ...int64)

func (*Runtime) ExecAction

func (r *Runtime) ExecAction(opts *xtypes.ActionEventOptions) error

func (*Runtime) ExecActionQ

func (r *Runtime) ExecActionQ(spaceId int64, req xtypes.ActionRequest, etype, actionName string) error

func (*Runtime) ExecHttp

func (r *Runtime) ExecHttp(opts *xtypes.HttpEventOptions) error

func (*Runtime) ExecHttpQ

func (r *Runtime) ExecHttpQ(installedId, packageVersionId, spaceId int64, ctx *gin.Context) error

func (*Runtime) GetDebugData

func (r *Runtime) GetDebugData() map[int64]any

func (*Runtime) GetExec

func (r *Runtime) GetExec(spaceid int64) (*RunningExec, error)

type SpaceInfo

type SpaceInfo struct {
	ID            int64  `json:"id"`
	NamespaceKey  string `json:"namespace_key"`
	OwnsNamespace bool   `json:"owns_namespace"`
	PackageName   string `json:"package_name"`
}

type SpaceRouteIndexItem

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

Jump to

Keyboard shortcuts

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