Skip to main content
Version: v3.8.0

Apps package

The apps package deploys ioFog Application and Microservice resources to the Controller. potctl and the ioFog Operator use these executors when applying YAML configuration.

Import path: github.com/eclipse-iofog/iofog-go-sdk/v3/pkg/apps

It wraps the client package and maps Go structs to Controller REST calls. For raw HTTP access, use client directly. Route reference: Controller REST API.

apiVersion

Deploy YAML emitted by this package includes an apiVersion header. The default is iofog.org/v3 (apps.DefaultAPIVersion).

For the Datasance docs flavor, pass WithAPIVersion at the call site:

apps.DeployApplication(ctrl, app, name, apps.WithAPIVersion("datasance.com/v3"))

Deploy an application

import (
"os"

"github.com/eclipse-iofog/iofog-go-sdk/v3/pkg/apps"
"gopkg.in/yaml.v2"
)

controller := apps.IofogController{
Endpoint: "127.0.0.1:51121",
Password: "password",
}

application := apps.Application{
Name: "my-app",
// ... remaining fields
}

// OR, read spec from a YAML file
yamlFile, err := os.ReadFile(filename)
if err != nil {
return err
}
var header apps.IofogHeader
if err := yaml.Unmarshal(yamlFile, &header); err != nil {
return err
}

// Deploy (default apiVersion: iofog.org/v3)
err = apps.DeployApplication(controller, application, "my-app")

Other entry points:

  • DeployMicroservice
  • DeployApplicationTemplate

Each accepts optional DeployOption values (for example WithAPIVersion).

v3.8 deploy type changes

When porting YAML or Go structs from SDK v3.7:

v3.7 field or keyv3.8
flowapplication
dockerUrlcontainerEngineUrl
Catalog x86 / arm image keysamd64, arm64, riscv64, arm
Flow-named REST helpers in clientApplication-named helpers

The Operator no longer reconciles Application CRDs. Deploy application workloads with potctl, EdgeOps Console, the REST API, or this package after the Control Plane is up.

TopicPage
SDK overviewioFog Go SDK
Application YAMLApplication reference
Microservice YAMLMicroservice reference
potctl deploypotctl introduction
Group 3See anything wrong with the document? Help us improve it!