engine, gapi, lang, lib: Plumb through new local API

This is a new API that is similar in spirit and plumbing to the World
API, but it intended for all local machine operations and will likely
only ever have one implementation.
This commit is contained in:
James Shubin
2023-12-01 15:18:12 -05:00
parent 12ffac1f06
commit 9d47b6843f
11 changed files with 97 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ import (
"time"
"github.com/purpleidea/mgmt/engine"
"github.com/purpleidea/mgmt/engine/local"
"github.com/purpleidea/mgmt/lang/funcs/structs"
"github.com/purpleidea/mgmt/lang/interfaces"
"github.com/purpleidea/mgmt/lang/types"
@@ -44,6 +45,7 @@ type Engine struct {
Name string
Hostname string
Local *local.API
World engine.World
Debug bool
@@ -289,6 +291,7 @@ func (obj *Engine) addVertex(f interfaces.Func) error {
Input: node.input,
Output: node.output,
Txn: node.txn,
Local: obj.Local,
World: obj.World,
Debug: obj.Debug,
Logf: func(format string, v ...interface{}) {