Documentation ¶
Index ¶
- func GetConfigMapKey(gvk schema.GroupVersionKind) string
- func OpenSafeOs(L *lua.LState) int
- func SafeOsLoader(L *lua.LState) int
- type ResourceHealthOverrides
- type VM
- func (vm VM) ExecuteHealthLua(obj *unstructured.Unstructured, script string) (*health.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, bool, 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 ¶
func GetConfigMapKey ¶ added in v2.1.0
func GetConfigMapKey(gvk schema.GroupVersionKind) string
func OpenSafeOs ¶
func SafeOsLoader ¶
Types ¶
type ResourceHealthOverrides ¶
type ResourceHealthOverrides map[string]appv1.ResourceOverride
func (ResourceHealthOverrides) GetResourceHealth ¶
func (overrides ResourceHealthOverrides) GetResourceHealth(obj *unstructured.Unstructured) (*health.HealthStatus, error)
type VM ¶
type VM struct { ResourceOverrides map[string]appv1.ResourceOverride // UseOpenLibs flag to enable open libraries. Libraries are disabled by default 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) (*health.HealthStatus, error)
ExecuteHealthLua runs the lua script to generate the health status of a resource
func (VM) ExecuteResourceAction ¶
func (vm VM) ExecuteResourceAction(obj *unstructured.Unstructured, script string) (*unstructured.Unstructured, error)
func (VM) ExecuteResourceActionDiscovery ¶
func (vm VM) ExecuteResourceActionDiscovery(obj *unstructured.Unstructured, script string) ([]appv1.ResourceAction, error)
func (VM) GetHealthScript ¶
func (vm VM) GetHealthScript(obj *unstructured.Unstructured) (string, bool, error)
GetHealthScript attempts to read lua script from config and then filesystem for that resource
func (VM) GetResourceAction ¶
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 ¶
func (vm VM) GetResourceActionDiscovery(obj *unstructured.Unstructured) (string, error)
Click to show internal directories.
Click to hide internal directories.