Documentation
¶
Overview ¶
Copyright 2023 Northern.tech AS
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Copyright 2023 Northern.tech AS
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Index ¶
- Variables
- func GetDeviceType(deviceTypeFile string) (string, error)
- func GetManifestData(dataType, manifestFile string) (string, error)
- func NewStateScriptExecutor(config *conf.MenderConfig) statescript.Launcher
- type DeviceManager
- func (d *DeviceManager) GetCurrentArtifactGroup() (string, error)
- func (d *DeviceManager) GetCurrentArtifactName() (string, error)
- func (d *DeviceManager) GetDeviceType() (string, error)
- func (d *DeviceManager) GetInstallers() []installer.PayloadUpdatePerformer
- func (d *DeviceManager) GetProvides() (map[string]string, error)
- func (d *DeviceManager) ReadArtifactHeaders(from io.ReadCloser) (*installer.Installer, error)
- func (d *DeviceManager) RestoreInstallersFromTypeList(payloadTypes []string) error
- type IdentityData
- type IdentityDataGetter
- type IdentityDataRunner
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IdentityDataHelper = path.Join( conf.GetDataDirPath(), "identity", "mender-device-identity", ) )
Functions ¶
func GetDeviceType ¶
func GetManifestData ¶
func NewStateScriptExecutor ¶
func NewStateScriptExecutor(config *conf.MenderConfig) statescript.Launcher
Types ¶
type DeviceManager ¶
type DeviceManager struct {
Config conf.MenderConfig
DeviceTypeFile string
BootstrapArtifactFile string
Installers []installer.PayloadUpdatePerformer
InstallerFactories installer.AllModules
StateScriptExecutor statescript.Executor
StateScriptPath string
Store store.Store
}
func NewDeviceManager ¶
func NewDeviceManager( dualRootfsDevice installer.DualRootfsDevice, config *conf.MenderConfig, store store.Store, ) *DeviceManager
func (*DeviceManager) GetCurrentArtifactGroup ¶
func (d *DeviceManager) GetCurrentArtifactGroup() (string, error)
func (*DeviceManager) GetCurrentArtifactName ¶
func (d *DeviceManager) GetCurrentArtifactName() (string, error)
func (*DeviceManager) GetDeviceType ¶
func (d *DeviceManager) GetDeviceType() (string, error)
func (*DeviceManager) GetInstallers ¶
func (d *DeviceManager) GetInstallers() []installer.PayloadUpdatePerformer
func (*DeviceManager) GetProvides ¶
func (d *DeviceManager) GetProvides() (map[string]string, error)
func (*DeviceManager) ReadArtifactHeaders ¶
func (d *DeviceManager) ReadArtifactHeaders(from io.ReadCloser) (*installer.Installer, error)
func (*DeviceManager) RestoreInstallersFromTypeList ¶
func (d *DeviceManager) RestoreInstallersFromTypeList(payloadTypes []string) error
type IdentityData ¶
type IdentityData map[string]interface{}
Try to keep things simple and reuse InventoryData as identity data structure
func (IdentityData) AppendFromRaw ¶
func (id IdentityData) AppendFromRaw(raw map[string][]string)
type IdentityDataGetter ¶
type IdentityDataGetter interface {
// obtain identity data as a string or return an error
Get() (string, error)
}
func NewIdentityDataGetter ¶
func NewIdentityDataGetter() IdentityDataGetter
type IdentityDataRunner ¶
func (IdentityDataRunner) Get ¶
func (id IdentityDataRunner) Get() (string, error)
Obtain identity data by calling a suitable helper tool
Click to show internal directories.
Click to hide internal directories.