 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- func VersionIncrement(configOld []byte) ([]byte, error)
- type Cloud
- type CloudCtx
- func (cloud *CloudCtx) AddApplicationInstanceConfig(applicationInstanceConfig *config.AppInstanceConfig) error
- func (cloud *CloudCtx) AddBaseOsConfig(baseOSConfig *config.BaseOSConfig) error
- func (cloud *CloudCtx) AddBondAdapter(id string, bondAdapter *config.BondAdapter) error
- func (cloud *CloudCtx) AddContentTree(contentTree *config.ContentTree) error
- func (cloud *CloudCtx) AddDataStore(dataStoreConfig *config.DatastoreConfig) error
- func (cloud *CloudCtx) AddDevice(devUUID uuid.UUID) (dev *device.Ctx, err error)
- func (cloud *CloudCtx) AddImage(imageConfig *config.Image) error
- func (cloud *CloudCtx) AddNetworkConfig(networkConfig *config.NetworkConfig) error
- func (cloud *CloudCtx) AddNetworkInstanceConfig(networkInstanceConfig *config.NetworkInstanceConfig) error
- func (cloud *CloudCtx) AddPhysicalIO(id string, physicalIO *config.PhysicalIO) error
- func (cloud *CloudCtx) AddSystemAdapter(id string, systemAdapter *config.SystemAdapter) error
- func (cloud *CloudCtx) AddVlanAdapter(id string, vlanAdapter *config.VlanAdapter) error
- func (cloud *CloudCtx) AddVolume(volume *config.Volume) error
- func (cloud *CloudCtx) ApplyDevModel(dev *device.Ctx, devModel models.DevModel) error
- func (cloud *CloudCtx) ConfigParse(config *config.EdgeDevConfig) (*device.Ctx, error)
- func (cloud *CloudCtx) ConfigSync(dev *device.Ctx) (err error)
- func (cloud *CloudCtx) GetAllNodes()
- func (cloud *CloudCtx) GetApplicationInstanceConfig(id string) (applicationInstanceConfig *config.AppInstanceConfig, err error)
- func (cloud *CloudCtx) GetBaseOSConfig(id string) (baseOSConfig *config.BaseOSConfig, err error)
- func (cloud *CloudCtx) GetBondAdapter(id string) (bondAdapter *config.BondAdapter, err error)
- func (cloud *CloudCtx) GetConfigBytes(dev *device.Ctx, jsonFormat bool) ([]byte, error)
- func (cloud *CloudCtx) GetContentTree(id string) (contentTree *config.ContentTree, err error)
- func (cloud *CloudCtx) GetDataStore(id string) (ds *config.DatastoreConfig, err error)
- func (cloud *CloudCtx) GetDeviceCurrent() (dev *device.Ctx, err error)
- func (cloud *CloudCtx) GetDeviceUUID(devUUID uuid.UUID) (dev *device.Ctx, err error)
- func (cloud *CloudCtx) GetImage(id string) (image *config.Image, err error)
- func (cloud *CloudCtx) GetNetworkConfig(id string) (networkConfig *config.NetworkConfig, err error)
- func (cloud *CloudCtx) GetNetworkInstanceConfig(id string) (networkInstanceConfig *config.NetworkInstanceConfig, err error)
- func (cloud *CloudCtx) GetPhysicalIO(id string) (physicalIO *config.PhysicalIO, err error)
- func (cloud *CloudCtx) GetSystemAdapter(id string) (systemAdapter *config.SystemAdapter, err error)
- func (cloud *CloudCtx) GetVars() *utils.ConfigVars
- func (cloud *CloudCtx) GetVlanAdapter(id string) (vlanAdapter *config.VlanAdapter, err error)
- func (cloud *CloudCtx) GetVolume(id string) (volume *config.Volume, err error)
- func (cloud *CloudCtx) ListApplicationInstanceConfig() []*config.AppInstanceConfig
- func (cloud *CloudCtx) ListBaseOSConfig() []*config.BaseOSConfig
- func (cloud *CloudCtx) ListContentTree() []*config.ContentTree
- func (cloud *CloudCtx) ListDataStore() []*config.DatastoreConfig
- func (cloud *CloudCtx) ListImage() []*config.Image
- func (cloud *CloudCtx) ListNetworkInstanceConfig() []*config.NetworkInstanceConfig
- func (cloud *CloudCtx) ListVolume() []*config.Volume
- func (cloud *CloudCtx) OnBoardDev(node *device.Ctx) error
- func (cloud *CloudCtx) RemoveApplicationInstanceConfig(id string) error
- func (cloud *CloudCtx) RemoveBaseOsConfig(id string) error
- func (cloud *CloudCtx) RemoveBondAdapter(id string) error
- func (cloud *CloudCtx) RemoveContentTree(id string) error
- func (cloud *CloudCtx) RemoveDataStore(id string) error
- func (cloud *CloudCtx) RemoveImage(id string) error
- func (cloud *CloudCtx) RemoveNetworkConfig(id string) error
- func (cloud *CloudCtx) RemoveNetworkInstanceConfig(id string) error
- func (cloud *CloudCtx) RemovePhysicalIO(id string) error
- func (cloud *CloudCtx) RemoveSystemAdapter(id string) error
- func (cloud *CloudCtx) RemoveVlanAdapter(id string) error
- func (cloud *CloudCtx) RemoveVolume(id string) error
- func (cloud *CloudCtx) ResetDev(node *device.Ctx) error
- func (cloud *CloudCtx) SetVars(vars *utils.ConfigVars)
- func (cloud *CloudCtx) StateUpdate(dev *device.Ctx) (err error)
 
- type Controller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VersionIncrement ¶
VersionIncrement use []byte with config.EdgeDevConfig and increment config version
Types ¶
type Cloud ¶
type Cloud interface {
	Controller
	AddDevice(devUUID uuid.UUID) (dev *device.Ctx, err error)
	GetDeviceUUID(devUUID uuid.UUID) (dev *device.Ctx, err error)
	GetBaseOSConfig(id string) (baseOSConfig *config.BaseOSConfig, err error)
	ListBaseOSConfig() []*config.BaseOSConfig
	AddBaseOsConfig(baseOSConfig *config.BaseOSConfig) error
	RemoveBaseOsConfig(id string) error
	AddDataStore(dataStoreConfig *config.DatastoreConfig) error
	GetDataStore(id string) (ds *config.DatastoreConfig, err error)
	RemoveDataStore(id string) error
	ListDataStore() []*config.DatastoreConfig
	GetNetworkInstanceConfig(id string) (networkInstanceConfig *config.NetworkInstanceConfig, err error)
	AddNetworkInstanceConfig(networkInstanceConfig *config.NetworkInstanceConfig) error
	ListNetworkInstanceConfig() []*config.NetworkInstanceConfig
	RemoveNetworkInstanceConfig(id string) error
	GetImage(id string) (image *config.Image, err error)
	AddImage(imageConfig *config.Image) error
	RemoveImage(id string) error
	ListImage() []*config.Image
	GetContentTree(id string) (image *config.ContentTree, err error)
	AddContentTree(contentTreeConfig *config.ContentTree) error
	RemoveContentTree(id string) error
	ListContentTree() []*config.ContentTree
	GetVolume(id string) (image *config.Volume, err error)
	AddVolume(volumeConfig *config.Volume) error
	RemoveVolume(id string) error
	ListVolume() []*config.Volume
	GetConfigBytes(dev *device.Ctx, jsonFormat bool) ([]byte, error)
	GetDeviceCurrent() (dev *device.Ctx, err error)
	ConfigSync(dev *device.Ctx) (err error)
	ConfigParse(config *config.EdgeDevConfig) (dev *device.Ctx, err error)
	GetNetworkConfig(id string) (networkConfig *config.NetworkConfig, err error)
	AddNetworkConfig(networkInstanceConfig *config.NetworkConfig) error
	RemoveNetworkConfig(id string) error
	GetPhysicalIO(id string) (physicalIO *config.PhysicalIO, err error)
	AddPhysicalIO(id string, physicalIO *config.PhysicalIO) error
	RemovePhysicalIO(id string) error
	GetSystemAdapter(id string) (systemAdapter *config.SystemAdapter, err error)
	AddSystemAdapter(id string, systemAdapter *config.SystemAdapter) error
	RemoveSystemAdapter(id string) error
	GetVlanAdapter(id string) (vlanAdapter *config.VlanAdapter, err error)
	AddVlanAdapter(id string, vlanAdapter *config.VlanAdapter) error
	RemoveVlanAdapter(id string) error
	GetBondAdapter(id string) (bondAdapter *config.BondAdapter, err error)
	AddBondAdapter(id string, bondAdapter *config.BondAdapter) error
	RemoveBondAdapter(id string) error
	ApplyDevModel(dev *device.Ctx, devModel models.DevModel) error
	GetApplicationInstanceConfig(id string) (applicationInstanceConfig *config.AppInstanceConfig, err error)
	AddApplicationInstanceConfig(applicationInstanceConfig *config.AppInstanceConfig) error
	RemoveApplicationInstanceConfig(id string) error
	ListApplicationInstanceConfig() []*config.AppInstanceConfig
	StateUpdate(dev *device.Ctx) (err error)
	ResetDev(node *device.Ctx) error
	OnBoardDev(node *device.Ctx) error
	GetVars() *utils.ConfigVars
	SetVars(*utils.ConfigVars)
	GetAllNodes()
}
    Cloud is an interface of cloud
func CloudPrepare ¶
CloudPrepare is for init controller connection and obtain device list
type CloudCtx ¶
type CloudCtx struct {
	Controller
	// contains filtered or unexported fields
}
    CloudCtx is struct for use with controller
func (*CloudCtx) AddApplicationInstanceConfig ¶
func (cloud *CloudCtx) AddApplicationInstanceConfig(applicationInstanceConfig *config.AppInstanceConfig) error
AddApplicationInstanceConfig add AppInstanceConfig config to cloud
func (*CloudCtx) AddBaseOsConfig ¶
func (cloud *CloudCtx) AddBaseOsConfig(baseOSConfig *config.BaseOSConfig) error
AddBaseOsConfig add baseOSConfigs config to cloud
func (*CloudCtx) AddBondAdapter ¶ added in v1.0.0
func (cloud *CloudCtx) AddBondAdapter(id string, bondAdapter *config.BondAdapter) error
AddBondAdapter add BondAdapter config to cloud
func (*CloudCtx) AddContentTree ¶
func (cloud *CloudCtx) AddContentTree(contentTree *config.ContentTree) error
AddContentTree add ContentTree config to cloud
func (*CloudCtx) AddDataStore ¶
func (cloud *CloudCtx) AddDataStore(dataStoreConfig *config.DatastoreConfig) error
AddDataStore add DataStore config to cloud
func (*CloudCtx) AddNetworkConfig ¶
func (cloud *CloudCtx) AddNetworkConfig(networkConfig *config.NetworkConfig) error
AddNetworkConfig add NetworkConfig config to cloud
func (*CloudCtx) AddNetworkInstanceConfig ¶
func (cloud *CloudCtx) AddNetworkInstanceConfig(networkInstanceConfig *config.NetworkInstanceConfig) error
AddNetworkInstanceConfig add NetworkInstance config to cloud
func (*CloudCtx) AddPhysicalIO ¶
func (cloud *CloudCtx) AddPhysicalIO(id string, physicalIO *config.PhysicalIO) error
AddPhysicalIO add PhysicalIO config to cloud
func (*CloudCtx) AddSystemAdapter ¶
func (cloud *CloudCtx) AddSystemAdapter(id string, systemAdapter *config.SystemAdapter) error
AddSystemAdapter add SystemAdapter config to cloud
func (*CloudCtx) AddVlanAdapter ¶ added in v1.0.0
func (cloud *CloudCtx) AddVlanAdapter(id string, vlanAdapter *config.VlanAdapter) error
AddVlanAdapter add VlanAdapter config to cloud
func (*CloudCtx) ApplyDevModel ¶
ApplyDevModel apply networks, adapters and physicalIOs from DevModel to device
func (*CloudCtx) ConfigParse ¶
ConfigParse load config into cloud
func (*CloudCtx) ConfigSync ¶
ConfigSync set config for devID
func (*CloudCtx) GetAllNodes ¶
func (cloud *CloudCtx) GetAllNodes()
GetAllNodes obtains all devices from controller
func (*CloudCtx) GetApplicationInstanceConfig ¶
func (cloud *CloudCtx) GetApplicationInstanceConfig(id string) (applicationInstanceConfig *config.AppInstanceConfig, err error)
GetApplicationInstanceConfig return AppInstanceConfig config from cloud by ID
func (*CloudCtx) GetBaseOSConfig ¶
func (cloud *CloudCtx) GetBaseOSConfig(id string) (baseOSConfig *config.BaseOSConfig, err error)
GetBaseOSConfig return baseOSConfigs config from cloud by ID
func (*CloudCtx) GetBondAdapter ¶ added in v1.0.0
func (cloud *CloudCtx) GetBondAdapter(id string) (bondAdapter *config.BondAdapter, err error)
GetBondAdapter return BondAdapter config from cloud by ID
func (*CloudCtx) GetConfigBytes ¶
GetConfigBytes generate json representation of device config
func (*CloudCtx) GetContentTree ¶
func (cloud *CloudCtx) GetContentTree(id string) (contentTree *config.ContentTree, err error)
GetContentTree return ContentTree config from cloud by ID
func (*CloudCtx) GetDataStore ¶
func (cloud *CloudCtx) GetDataStore(id string) (ds *config.DatastoreConfig, err error)
GetDataStore return DataStore config from cloud by ID
func (*CloudCtx) GetDeviceCurrent ¶
GetDeviceCurrent return current device object
func (*CloudCtx) GetDeviceUUID ¶
GetDeviceUUID return device object by devUUID
func (*CloudCtx) GetNetworkConfig ¶
func (cloud *CloudCtx) GetNetworkConfig(id string) (networkConfig *config.NetworkConfig, err error)
GetNetworkConfig return NetworkConfig config from cloud by ID
func (*CloudCtx) GetNetworkInstanceConfig ¶
func (cloud *CloudCtx) GetNetworkInstanceConfig(id string) (networkInstanceConfig *config.NetworkInstanceConfig, err error)
GetNetworkInstanceConfig return NetworkInstance config from cloud by ID
func (*CloudCtx) GetPhysicalIO ¶
func (cloud *CloudCtx) GetPhysicalIO(id string) (physicalIO *config.PhysicalIO, err error)
GetPhysicalIO return PhysicalIO config from cloud by ID
func (*CloudCtx) GetSystemAdapter ¶
func (cloud *CloudCtx) GetSystemAdapter(id string) (systemAdapter *config.SystemAdapter, err error)
GetSystemAdapter return SystemAdapter config from cloud by ID
func (*CloudCtx) GetVars ¶
func (cloud *CloudCtx) GetVars() *utils.ConfigVars
GetVars returns variables of controller
func (*CloudCtx) GetVlanAdapter ¶ added in v1.0.0
func (cloud *CloudCtx) GetVlanAdapter(id string) (vlanAdapter *config.VlanAdapter, err error)
GetVlanAdapter return VlanAdapter config from cloud by ID
func (*CloudCtx) ListApplicationInstanceConfig ¶
func (cloud *CloudCtx) ListApplicationInstanceConfig() []*config.AppInstanceConfig
ListApplicationInstanceConfig return ApplicationInstance configs from cloud
func (*CloudCtx) ListBaseOSConfig ¶
func (cloud *CloudCtx) ListBaseOSConfig() []*config.BaseOSConfig
ListBaseOSConfig return baseOSConfigs configs from cloud
func (*CloudCtx) ListContentTree ¶
func (cloud *CloudCtx) ListContentTree() []*config.ContentTree
ListContentTree return ContentTree configs from cloud
func (*CloudCtx) ListDataStore ¶
func (cloud *CloudCtx) ListDataStore() []*config.DatastoreConfig
ListDataStore return DataStore configs from cloud
func (*CloudCtx) ListNetworkInstanceConfig ¶
func (cloud *CloudCtx) ListNetworkInstanceConfig() []*config.NetworkInstanceConfig
ListNetworkInstanceConfig return NetworkInstance configs from cloud
func (*CloudCtx) ListVolume ¶
ListVolume return Volume configs from cloud
func (*CloudCtx) OnBoardDev ¶
OnBoardDev in controller
func (*CloudCtx) RemoveApplicationInstanceConfig ¶
RemoveApplicationInstanceConfig remove AppInstanceConfig config to cloud
func (*CloudCtx) RemoveBaseOsConfig ¶
RemoveBaseOsConfig remove BaseOsConfig from cloud
func (*CloudCtx) RemoveBondAdapter ¶ added in v1.0.0
RemoveBondAdapter remove BondAdapter config from cloud
func (*CloudCtx) RemoveContentTree ¶
RemoveContentTree remove ContentTree config to cloud
func (*CloudCtx) RemoveDataStore ¶
RemoveDataStore remove DataStore config from cloud
func (*CloudCtx) RemoveImage ¶
RemoveImage remove Image config from cloud
func (*CloudCtx) RemoveNetworkConfig ¶
RemoveNetworkConfig remove NetworkConfig config to cloud
func (*CloudCtx) RemoveNetworkInstanceConfig ¶
RemoveNetworkInstanceConfig remove NetworkInstance config to cloud
func (*CloudCtx) RemovePhysicalIO ¶
RemovePhysicalIO remove PhysicalIO config to cloud
func (*CloudCtx) RemoveSystemAdapter ¶
RemoveSystemAdapter remove SystemAdapter config to cloud
func (*CloudCtx) RemoveVlanAdapter ¶ added in v1.0.0
RemoveVlanAdapter remove VlanAdapter config from cloud
func (*CloudCtx) RemoveVolume ¶
RemoveVolume remove Volume config to cloud
func (*CloudCtx) SetVars ¶
func (cloud *CloudCtx) SetVars(vars *utils.ConfigVars)
SetVars sets variables of controller
type Controller ¶
type Controller interface {
	GetECDHCert(devUUID uuid.UUID) ([]byte, error)
	SigningCertGet() (signCert []byte, err error)
	ConfigGet(devUUID uuid.UUID) (out string, err error)
	ConfigSet(devUUID uuid.UUID, devConfig []byte) (err error)
	LogAppsChecker(devUUID uuid.UUID, appUUID uuid.UUID, q map[string]string, handler eapps.HandlerFunc, mode eapps.LogCheckerMode, timeout time.Duration) (err error)
	LogAppsLastCallback(devUUID uuid.UUID, appUUID uuid.UUID, q map[string]string, handler eapps.HandlerFunc) (err error)
	LogChecker(devUUID uuid.UUID, q map[string]string, handler elog.HandlerFunc, mode elog.LogCheckerMode, timeout time.Duration) (err error)
	LogLastCallback(devUUID uuid.UUID, q map[string]string, handler elog.HandlerFunc) (err error)
	FlowLogChecker(devUUID uuid.UUID, q map[string]string, handler eflowlog.HandlerFunc, mode eflowlog.FlowLogCheckerMode, timeout time.Duration) (err error)
	FlowLogLastCallback(devUUID uuid.UUID, q map[string]string, handler eflowlog.HandlerFunc) (err error)
	InfoChecker(devUUID uuid.UUID, q map[string]string, handler einfo.HandlerFunc, mode einfo.InfoCheckerMode, timeout time.Duration) (err error)
	InfoLastCallback(devUUID uuid.UUID, q map[string]string, handler einfo.HandlerFunc) (err error)
	MetricChecker(devUUID uuid.UUID, q map[string]string, handler emetric.HandlerFunc, mode emetric.MetricCheckerMode, timeout time.Duration) (err error)
	MetricLastCallback(devUUID uuid.UUID, q map[string]string, handler emetric.HandlerFunc) (err error)
	RequestLastCallback(devUUID uuid.UUID, q map[string]string, handler erequest.HandlerFunc) (err error)
	DeviceList(types.DeviceStateFilter) (out []string, err error)
	DeviceGetByOnboard(eveCert string) (devUUID uuid.UUID, err error)
	DeviceGetByOnboardUUID(onboardUUID string) (devUUID uuid.UUID, err error)
	DeviceGetOnboard(devUUID uuid.UUID) (onboardUUID uuid.UUID, err error)
	GetDeviceCert(device *device.Ctx) (*types.DeviceCert, error)
	SetDeviceOptions(uuid.UUID, *types.DeviceOptions) error
	GetDeviceOptions(uuid.UUID) (*types.DeviceOptions, error)
	SetGlobalOptions(*types.GlobalOptions) error
	GetGlobalOptions() (*types.GlobalOptions, error)
	UploadDeviceCert(types.DeviceCert) error
	OnboardRemove(onboardUUID string) (err error)
	DeviceRemove(devUUID uuid.UUID) (err error)
	Register(device *device.Ctx) error
	GetDir() (dir string)
	InitWithVars(vars *utils.ConfigVars) error
}
    Controller is an interface of controller
       Source Files
      ¶
      Source Files
      ¶
    
  
       Directories
      ¶
      Directories
      ¶
    
    | Path | Synopsis | 
|---|---|
| Package eapps provides primitives for searching and processing data in Log files of apps. | Package eapps provides primitives for searching and processing data in Log files of apps. | 
| Package eflowlog provides primitives for searching and processing data in FlowMessage files. | Package eflowlog provides primitives for searching and processing data in FlowMessage files. | 
| Package einfo provides primitives for searching and processing data in Info files. | Package einfo provides primitives for searching and processing data in Info files. | 
| Package elog provides primitives for searching and processing data in Log files. | Package elog provides primitives for searching and processing data in Log files. | 
| Package emetric provides primitives for searching and processing data in Metric files. | Package emetric provides primitives for searching and processing data in Metric files. | 
| Package erequest provides primitives for searching and processing data in Request files. | Package erequest provides primitives for searching and processing data in Request files. |