engine: Pass through the program version

We forgot this in a few places.
This commit is contained in:
James Shubin
2022-02-17 13:28:17 -05:00
parent bf7e45439b
commit 0ab2406db9
6 changed files with 12 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ const (
// Engine encapsulates a generic graph and manages its operations.
type Engine struct {
Program string
Version string
Hostname string
World engine.World
@@ -198,6 +199,7 @@ func (obj *Engine) Commit() error {
Vertex: vertex,
Program: obj.Program,
Version: obj.Version,
Hostname: obj.Hostname,
World: obj.World,

View File

@@ -40,6 +40,7 @@ type State struct {
Vertex pgraph.Vertex
Program string
Version string
Hostname string
World engine.World
@@ -154,6 +155,7 @@ func (obj *State) Init() error {
obj.init = &engine.Init{
Program: obj.Program,
Version: obj.Version,
Hostname: obj.Hostname,
// Watch:

View File

@@ -87,6 +87,9 @@ type Init struct {
// Program is the name of the program.
Program string
// Version is the version of the program.
Version string
// Hostname is the uuid for the host.
Hostname string

View File

@@ -70,6 +70,7 @@ type CliInfo struct {
// Data is the set of input values passed into the GAPI structs via Init.
type Data struct {
Program string // name of the originating program
Version string // version of the originating program
Hostname string // uuid for the host, required for GAPI
World engine.World
Noop bool

View File

@@ -178,6 +178,7 @@ func (obj *GAPI) Init(data *gapi.Data) error {
dataLang := &gapi.Data{
Program: obj.data.Program,
Version: obj.data.Version,
Hostname: obj.data.Hostname,
World: obj.data.World,
Noop: obj.data.Noop,
@@ -189,6 +190,7 @@ func (obj *GAPI) Init(data *gapi.Data) error {
}
dataPuppet := &gapi.Data{
Program: obj.data.Program,
Version: obj.data.Version,
Hostname: obj.data.Hostname,
World: obj.data.World,
Noop: obj.data.Noop,

View File

@@ -490,6 +490,7 @@ func (obj *Main) Run() error {
obj.ge = &graph.Engine{
Program: obj.Program,
Version: obj.Version,
Hostname: hostname,
World: world,
Prefix: fmt.Sprintf("%s/", path.Join(prefix, "engine")),
@@ -579,6 +580,7 @@ func (obj *Main) Run() error {
data := &gapi.Data{
Program: obj.Program,
Version: obj.Version,
Hostname: hostname,
World: world,
Noop: mainDeploy.Noop,