Documentation ¶
Index ¶
- Variables
- type AdminLaunchData
- type AgentIface
- type AuthLaunchData
- type BootData
- type BuilderFactory
- type DebugMessage
- type Engine
- type EngineHub
- type EventType
- type ExecBuilderFunc
- type ExecPool
- type Execution
- type Executor
- type ExecutorBinder
- type ExecutorBuilder
- type ExecutorIface
- type ExecutorOption
- type LaunchDomainOptions
- type LaunchOptions
- type Method
- type ModExecOptions
- type Module
- type ModuleBuilder
- type ModuleBuilderFunc
- type ModuleOptions
- type PoolManager
- type Router
- type RunningExec
- type Runtime
- type TargetLaunchData
- type ValueType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EmptyUserContext = "Empty user context" ResourceModuleNotFound = "Resource: module not found" ResourceWrongType = "Resource: wrong type" ResourceNotFound = "Resource: not found" LinkNotFound = "Link: not found" )
Functions ¶
This section is empty.
Types ¶
type AdminLaunchData ¶
type AgentIface ¶
type AuthLaunchData ¶
type AuthLaunchData struct{}
type BuilderFactory ¶
type BuilderFactory func(app any) (ExecutorBuilder, error)
type DebugMessage ¶
type EngineHub ¶
type EngineHub interface { GetEngine() Engine Start() error LaunchTargetDomain(tenantId, host, plugId, agentId string) (*LaunchDomainOptions, error) LaunchTarget(uclaim *claim.Session, data TargetLaunchData) (*LaunchOptions, error) LaunchAdmin(uclaim *claim.Session, data AdminLaunchData) (*LaunchOptions, error) Execute(tenantId, action string, ctx *gin.Context) ExecuteDev(dclaim *claim.UserContext, plug, agent, action string, body []byte) ([]byte, error) Reset(tenantId, plugId, agentId string) error ServeAgentFile(tenantId, plugId, agentId, file string) ([]byte, error) ServeExecutorFile(tenantId, plugId, agentId, file string) ([]byte, error) ListExecutors() ([]string, error) ListModules() ([]string, error) RunStartupHooks(tenants []string, minwait time.Duration) }
EngineHub is sits on top of Engine, Launch are related to TargetApps, Run are related to TargetHooks.
type ExecBuilderFunc ¶
type ExecBuilderFunc func(ExecutorOption) (Executor, error)
func (ExecBuilderFunc) IfaceFile ¶
func (e ExecBuilderFunc) IfaceFile() (*ExecutorIface, error)
func (ExecBuilderFunc) Instance ¶
func (e ExecBuilderFunc) Instance(opts ExecutorOption) (Executor, error)
type ExecutorBinder ¶
type ExecutorBuilder ¶
type ExecutorBuilder interface { Instance(ExecutorOption) (Executor, error) ExecFile(file string) ([]byte, error) IfaceFile() (*ExecutorIface, error) }
type ExecutorIface ¶
type ExecutorIface struct { Methods map[string]*Method `json:"methods,omitempty"` Events map[string]*EventType `json:"events,omitempty"` Schemas map[string]*ValueType `json:"schemas,omitempty"` Bindings map[string]*Method `json:"bindings,omitempty"` Definations map[string]any `json:"definations,omitempty"` }
type ExecutorOption ¶
type LaunchDomainOptions ¶
type LaunchOptions ¶
type LaunchOptions struct { ApiBaseURL string `json:"api_base_url,omitempty"` Token string `json:"token,omitempty"` EntryName string `json:"entry,omitempty"` ExecLoader string `json:"exec_loader,omitempty"` JSPlugScript string `json:"js_plug_script,omitempty"` StyleFile string `json:"style,omitempty"` ExtScripts map[string]string `json:"ext_scripts,omitempty"` Plug string `json:"plug,omitempty"` Agent string `json:"agent,omitempty"` }
type ModExecOptions ¶
type ModuleBuilder ¶
type ModuleBuilder interface {
Instance(ModuleOptions) (Module, error)
}
type ModuleBuilderFunc ¶
type ModuleBuilderFunc func(app any) (ModuleBuilder, error)
type ModuleOptions ¶
type PoolManager ¶
type RunningExec ¶
type Runtime ¶
type Runtime interface { Run(map[string]ExecutorBuilder, map[string]ModuleBuilder) error Preform(j *job.Job) (*event.Response, error) PreformAsync(j *job.AsyncJob) ResetAgents(tenantId, plug string, agents []string) ResetBprint(tenantId, bprint string) ListRunning(tenantId string) ([]RunningExec, error) }
type TargetLaunchData ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.