application

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var List map[int]*Application

List holds all the applications assigned to the edge-node-manager Key is the applicationUUID

Functions

This section is empty.

Types

type Application

type Application struct {
	UUID          int         `json:"id"`
	Name          string      `json:"name"`
	Commit        string      `json:"-"`      // Ignore this when unmarshalling from the supervisor as we want to set the target commit
	TargetCommit  string      `json:"commit"` // Set json tag to commit as the supervisor has no concept of target commit
	Config        interface{} `json:"config"`
	device.Type   `json:"type"`
	FilePath      string
	Devices       map[string]*device.Device // Key is the device's localUUID
	OnlineDevices map[string]bool           // Key is the device's localUUID
}

Application contains all the variables needed to define an application

func (*Application) GetDevices

func (a *Application) GetDevices() error

GetDevices gets all provisioned devices associated with the application

func (*Application) GetOnlineDevices

func (a *Application) GetOnlineDevices() error

GetOnlineDevices gets all online devices associated with the application

func (*Application) ProvisionDevices

func (a *Application) ProvisionDevices() []error

ProvisionDevices provisions all non-provisoned online devices associated with the application

func (*Application) PutDevices

func (a *Application) PutDevices() error

PutDevices puts all provisioned devices associated with the application

func (*Application) RestartOnlineDevices

func (a *Application) RestartOnlineDevices() error

RestartOnlineDevices restarts online devices associated with the application if the restart flag is set

func (*Application) SetOfflineDeviceStatus

func (a *Application) SetOfflineDeviceStatus() []error

SetOfflineDeviceStatus sets the status for all offline provisioned devices associated with the application

func (Application) String

func (a Application) String() string

func (*Application) UpdateOnlineDevices

func (a *Application) UpdateOnlineDevices() []error

UpdateOnlineDevices updates all online devices associated with the application

func (Application) Validate

func (a Application) Validate() bool

Validate ensures the application micro and radio type has been manually set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL