Documentation ¶
Index ¶
- type VM
- func (vm VM) ExecuteHealthLua(obj *unstructured.Unstructured, script string) (*appv1.HealthStatus, error)
- func (vm VM) ExecuteResourceAction(obj *unstructured.Unstructured, script string) (*unstructured.Unstructured, error)
- func (vm VM) ExecuteResourceActionDiscovery(obj *unstructured.Unstructured, script string) ([]appv1.ResourceAction, error)
- func (vm VM) GetHealthScript(obj *unstructured.Unstructured) (string, error)
- func (vm VM) GetResourceAction(obj *unstructured.Unstructured, actionName string) (appv1.ResourceActionDefinition, error)
- func (vm VM) GetResourceActionDiscovery(obj *unstructured.Unstructured) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VM ¶
type VM struct { ResourceOverrides map[string]appv1.ResourceOverride // UseOpenLibs flag to enable open libraries. Libraries are always disabled while running, but enabled during testing to allow the use of print statements UseOpenLibs bool }
VM Defines a struct that implements the luaVM
func (VM) ExecuteHealthLua ¶
func (vm VM) ExecuteHealthLua(obj *unstructured.Unstructured, script string) (*appv1.HealthStatus, error)
ExecuteHealthLua runs the lua script to generate the health status of a resource
func (VM) ExecuteResourceAction ¶ added in v1.0.0
func (vm VM) ExecuteResourceAction(obj *unstructured.Unstructured, script string) (*unstructured.Unstructured, error)
func (VM) ExecuteResourceActionDiscovery ¶ added in v1.0.0
func (vm VM) ExecuteResourceActionDiscovery(obj *unstructured.Unstructured, script string) ([]appv1.ResourceAction, error)
func (VM) GetHealthScript ¶
func (vm VM) GetHealthScript(obj *unstructured.Unstructured) (string, error)
GetHealthScript attempts to read lua script from config and then filesystem for that resource
func (VM) GetResourceAction ¶ added in v1.0.0
func (vm VM) GetResourceAction(obj *unstructured.Unstructured, actionName string) (appv1.ResourceActionDefinition, error)
GetResourceAction attempts to read lua script from config and then filesystem for that resource
func (VM) GetResourceActionDiscovery ¶ added in v1.0.0
func (vm VM) GetResourceActionDiscovery(obj *unstructured.Unstructured) (string, error)
Click to show internal directories.
Click to hide internal directories.