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

@@ -28,6 +28,7 @@ import (
"github.com/purpleidea/mgmt/converger"
"github.com/purpleidea/mgmt/engine"
"github.com/purpleidea/mgmt/engine/local"
engineUtil "github.com/purpleidea/mgmt/engine/util"
"github.com/purpleidea/mgmt/pgraph"
"github.com/purpleidea/mgmt/util/errwrap"
@@ -47,6 +48,7 @@ type Engine struct {
Hostname string
Converger *converger.Coordinator
Local *local.API
World engine.World
// Prefix is a unique directory prefix which can be used. It should be
@@ -224,6 +226,7 @@ func (obj *Engine) Commit() error {
Hostname: obj.Hostname,
//Converger: obj.Converger,
Local: obj.Local,
World: obj.World,
Prefix: statePrefix,