Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EdgeConnector ¶
type EdgeConnector struct {
// contains filtered or unexported fields
}
EdgeConnector listens for Edge Thing configuration changes and notifies the corresponding edgeClient. It is used in the main package.
func InitScriptBasedSU ¶
func InitScriptBasedSU(scriptSUPConfig *ScriptBasedSoftwareUpdatableConfig) (*EdgeConnector, error)
InitScriptBasedSU creates a new Script-Based SoftwareUpdatable instance, listening for edge configuration.
type ScriptBasedSoftwareUpdatable ¶
type ScriptBasedSoftwareUpdatable struct {
// contains filtered or unexported fields
}
ScriptBasedSoftwareUpdatable is the Script-Based SoftwareUpdatable actual implementation.
func (*ScriptBasedSoftwareUpdatable) Connect ¶
func (f *ScriptBasedSoftwareUpdatable) Connect(client MQTT.Client, scriptSUPConfig *ScriptBasedSoftwareUpdatableConfig, edgeCfg *edgeConfiguration) error
Connect the client to the configured Ditto endpoint. If any error occurs during the connection's initiation - it's returned here.
func (*ScriptBasedSoftwareUpdatable) Disconnect ¶
func (f *ScriptBasedSoftwareUpdatable) Disconnect(closeStorage bool)
Disconnect the client from the configured Ditto endpoint.
type ScriptBasedSoftwareUpdatableConfig ¶
type ScriptBasedSoftwareUpdatableConfig struct { Broker string Username string Password string StorageLocation string FeatureID string ModuleType string ArtifactType string ServerCert string DownloadRetryCount int DownloadRetryInterval durationTime InstallDirs pathArgs Mode string InstallCommand command }
ScriptBasedSoftwareUpdatableConfig provides the Script-Based SoftwareUpdatable configuration.
func InitFlags ¶
func InitFlags(version string) (*ScriptBasedSoftwareUpdatableConfig, *logger.LogConfig, error)
InitFlags tries to initialize Script-Based SoftwareUpdatable and Log configurations. Returns true if version flag is specified for print version and exit. Returns error if JSON configuration file cannot be read properly or missing config file is specified with flag.
func (*ScriptBasedSoftwareUpdatableConfig) Validate ¶
func (scriptSUPConfig *ScriptBasedSoftwareUpdatableConfig) Validate() error
Validate the software updatable configuration