# README

Edge-Cloud Controller

The Edge-Cloud Controller handles all persistent state and disseminates data to the Matcher and Cloudlet-Mgr nodes.

Persistent state is primarily inserted by User-driven API calls, i.e. to Create/Update/Delete Developers, Apps, Operators, Cloudlets, etc. Persistent state is stored via an Etcd database.

Persistent state is disseminated to the Matcher and Cloudlet-Mgr nodes by the notify mechanism whenever that data changes. The Matcher and Cloudlet-Mgr nodes are not part of the Etcd Cluster. They only manage a copy of the Controller's data in memory to allow for faster decision making on that data. The Matcher and Cloudlet-Mgr may not need the full set of data managed by the Controller, so the Controller will only forward changes that are needed.

Much of the code for handling objects is boiler-plate, and is handled by auto-generated code. See the protoc-gen-gomex readme. Additionally some unit test code is also generated by the protoc-gen-test code. See the readme there as well, plus the unit test template code in the go files there.

For controller unit tests that involve an etcd back-end, either the test uses a dummy etcd backend (dummy_etcd.go), or spawns a single etcd instance (the equivalent of which can be done by running the controller with --localEtcd).

CRM State Handling

See crm_state.md

# Functions

No description provided by the author
AppInstKeyName fixes an issue with the original AppInstKeyName upgrade function which failed to upgrade ClusterRefs properly, as it was looking for the wrong AppInst ref format.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
returns all the checkpointed appinsts of the most recent checkpoint with regards to timestamp.
GetAppInstID returns a string for this AppInst that is likely to be unique within the region.
returns all the checkpointed clusterinsts of the most recent checkpoint with regards to timestamp.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
InstanceKeysRegionScopedName deals with moving the CloudletKey out of the AppInst/ClusterInst Key and onto the object body, changing the unique key.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewCloudletCertRefreshTaskable returns a PeriodicTaskable for refreshing cloudlet certificates.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Init store and cache for MaxReqsRateLimitSettings.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Helper function to run a single upgrade function across all the elements of a KVStore fn will be called for each of the entries, and therefore it's up to the fn implementation to filter based on the prefix.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DataModelVersion0's db value is a string which was the hash value.
DataModelVersion0's db value is a string which was the hash value.
percentage.
Add in a little day to allow intermediate state changes to be seen.
No description provided by the author
No description provided by the author
For VM based Apps.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
For K8s/Docker based Apps.
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Transition states indicate states in which the CRM is still busy.
No description provided by the author
Transition states indicate states in which the CRM is still busy.
Transition states indicate states in which the CRM is still busy.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
influx timestamp ranges can handle (64-bit int min in time form).
for unit tests, so getClusterCheckpoint will never sleep.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Transition states indicate states in which the CRM is still busy.
No description provided by the author

# Structs

No description provided by the author
Should only be one of these instantiated in main.
No description provided by the author
Should only be one of these instantiated in main.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
New AppInstRefKey is the AppInst Name and Org.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CloudletTaskableHelper provides common code for any periodic cloudlet task.
No description provided by the author
No description provided by the author
No description provided by the author
New ClusterInstRefKey is just the ClusterKey.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
This synchronizes lease data with the persistent storage (etcd).
No description provided by the author
No description provided by the author
No description provided by the author
Vault roles for all services.
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
NameSanitizer is broken out as an interface for unit tests.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Prototype for the upgrade function - takes an objectstore and stm to ensure automicity of each upgrade function.