Documentation ¶
Index ¶
- Variables
- func IsNoControlPlaneError(err error) bool
- type Agent
- type AgentConfiguration
- type AgentScripts
- type Application
- type ApplicationTemplate
- type Auth
- type Container
- type ControlPlane
- type Controller
- type ControllerConfig
- type Credentials
- type Database
- type Display
- type EdgeResource
- type EdgeResourceHTTPInterface
- type HTTPEndpoint
- type IofogUser
- type KubeImages
- type KubernetesControlPlane
- func (cp *KubernetesControlPlane) AddController(baseController Controller) error
- func (cp *KubernetesControlPlane) Clone() ControlPlane
- func (cp *KubernetesControlPlane) DeleteController(name string) error
- func (cp *KubernetesControlPlane) GetController(name string) (ret Controller, err error)
- func (cp *KubernetesControlPlane) GetControllers() (controllers []Controller)
- func (cp *KubernetesControlPlane) GetEndpoint() (string, error)
- func (cp *KubernetesControlPlane) GetUser() IofogUser
- func (cp *KubernetesControlPlane) Sanitize() (err error)
- func (cp *KubernetesControlPlane) UpdateController(baseController Controller) error
- func (cp *KubernetesControlPlane) ValidateKubeConfig() error
- type KubernetesController
- func (ctrl *KubernetesController) Clone() Controller
- func (ctrl *KubernetesController) GetCreatedTime() string
- func (ctrl *KubernetesController) GetEndpoint() string
- func (ctrl *KubernetesController) GetName() string
- func (ctrl *KubernetesController) Sanitize() error
- func (ctrl *KubernetesController) SetName(name string)
- type LocalAgent
- func (agent *LocalAgent) Clone() Agent
- func (agent *LocalAgent) GetConfig() *AgentConfiguration
- func (agent *LocalAgent) GetControllerEndpoint() string
- func (agent *LocalAgent) GetCreatedTime() string
- func (agent *LocalAgent) GetHost() string
- func (agent *LocalAgent) GetName() string
- func (agent *LocalAgent) GetUUID() string
- func (agent *LocalAgent) Sanitize() error
- func (agent *LocalAgent) SetConfig(config *AgentConfiguration)
- func (agent *LocalAgent) SetCreatedTime(time string)
- func (agent *LocalAgent) SetHost(host string)
- func (agent *LocalAgent) SetName(name string)
- func (agent *LocalAgent) SetUUID(uuid string)
- type LocalControlPlane
- func (cp *LocalControlPlane) AddController(baseController Controller) error
- func (cp *LocalControlPlane) Clone() ControlPlane
- func (cp *LocalControlPlane) DeleteController(string) error
- func (cp *LocalControlPlane) GetController(name string) (Controller, error)
- func (cp *LocalControlPlane) GetControllers() []Controller
- func (cp *LocalControlPlane) GetEndpoint() (string, error)
- func (cp *LocalControlPlane) GetUser() IofogUser
- func (cp *LocalControlPlane) Sanitize() error
- func (cp *LocalControlPlane) UpdateController(baseController Controller) error
- type LocalController
- type Microservice
- type Namespace
- func (ns *Namespace) AddAgent(baseAgent Agent) error
- func (ns *Namespace) AddVolume(volume *Volume) error
- func (ns *Namespace) Clone() *Namespace
- func (ns *Namespace) DeleteAgent(name string) error
- func (ns *Namespace) DeleteAgents()
- func (ns *Namespace) DeleteControlPlane()
- func (ns *Namespace) DeleteController(name string) (err error)
- func (ns *Namespace) DeleteVolume(name string) error
- func (ns *Namespace) GetAgent(name string) (Agent, error)
- func (ns *Namespace) GetAgents() (agents []Agent)
- func (ns *Namespace) GetControlPlane() (ControlPlane, error)
- func (ns *Namespace) GetControllers() []Controller
- func (ns *Namespace) GetVolume(name string) (volume Volume, err error)
- func (ns *Namespace) GetVolumes() (volumes []Volume)
- func (ns *Namespace) SetControlPlane(baseControlPlane ControlPlane)
- func (ns *Namespace) UpdateAgent(baseAgent Agent) error
- func (ns *Namespace) UpdateVolume(volume *Volume)
- type NoControlPlaneError
- type NoKubeConfigError
- type NoSSHConfigError
- type Package
- type Registry
- type RemoteAgent
- func (agent *RemoteAgent) Clone() Agent
- func (agent *RemoteAgent) GetConfig() *AgentConfiguration
- func (agent *RemoteAgent) GetControllerEndpoint() string
- func (agent *RemoteAgent) GetCreatedTime() string
- func (agent *RemoteAgent) GetHost() string
- func (agent *RemoteAgent) GetName() string
- func (agent *RemoteAgent) GetUUID() string
- func (agent *RemoteAgent) Sanitize() (err error)
- func (agent *RemoteAgent) SetConfig(config *AgentConfiguration)
- func (agent *RemoteAgent) SetCreatedTime(time string)
- func (agent *RemoteAgent) SetHost(host string)
- func (agent *RemoteAgent) SetName(name string)
- func (agent *RemoteAgent) SetUUID(uuid string)
- func (agent *RemoteAgent) ValidateSSH() error
- type RemoteControlPlane
- func (cp *RemoteControlPlane) AddController(baseController Controller) error
- func (cp *RemoteControlPlane) Clone() ControlPlane
- func (cp *RemoteControlPlane) DeleteController(name string) error
- func (cp *RemoteControlPlane) GetController(name string) (ret Controller, err error)
- func (cp *RemoteControlPlane) GetControllers() (controllers []Controller)
- func (cp *RemoteControlPlane) GetEndpoint() (string, error)
- func (cp *RemoteControlPlane) GetUser() IofogUser
- func (cp *RemoteControlPlane) Sanitize() (err error)
- func (cp *RemoteControlPlane) UpdateController(baseController Controller) error
- type RemoteController
- func (ctrl *RemoteController) Clone() Controller
- func (ctrl *RemoteController) GetCreatedTime() string
- func (ctrl *RemoteController) GetEndpoint() string
- func (ctrl *RemoteController) GetName() string
- func (ctrl *RemoteController) Sanitize() (err error)
- func (ctrl *RemoteController) SetName(name string)
- func (ctrl *RemoteController) ValidateSSH() error
- type RemoteSystemMicroservices
- type Replicas
- type Route
- type SSH
- type Service
- type Services
- type Volume
Constants ¶
This section is empty.
Variables ¶
var FogTypeIntMap = map[int]string{
0: "auto",
1: "x86",
2: "arm",
}
FogTypeIntMap map Controller fog type to human readable fog type
var FogTypeStringMap = map[string]int64{
"auto": 0,
"x86": 1,
"arm": 2,
}
FogTypeStringMap map human readable fog type to Controller fog type
Functions ¶
func IsNoControlPlaneError ¶
Types ¶
type AgentConfiguration ¶
type AgentConfiguration struct { Name string `json:"name,omitempty" yaml:"name"` Location string `json:"location,omitempty" yaml:"location"` Latitude float64 `json:"latitude,omitempty" yaml:"latitude"` Longitude float64 `json:"longitude,omitempty" yaml:"longitude"` Description string `json:"description,omitempty" yaml:"description"` FogType *string `json:"fogType,omitempty" yaml:"agentType"` client.AgentConfiguration `yaml:",inline"` }
AgentConfiguration contains configuration information for a deployed agent
type AgentScripts ¶
type AgentScripts struct { install.AgentProcedures `yaml:",inline"` Directory string `yaml:"dir"` // Location of scripts }
type Application ¶
type Application = apps.Application
type ApplicationTemplate ¶
type ApplicationTemplate = apps.ApplicationTemplate
type Container ¶
type Container struct { Image string `yaml:"image,omitempty"` Credentials Credentials `yaml:"credentials,omitempty"` // Optional credentials if needed to pull images }
type ControlPlane ¶
type ControlPlane interface { GetUser() IofogUser GetControllers() []Controller GetController(string) (Controller, error) GetEndpoint() (string, error) UpdateController(Controller) error AddController(Controller) error DeleteController(string) error Sanitize() error Clone() ControlPlane }
type Controller ¶
type ControllerConfig ¶
type Credentials ¶
type Credentials struct { User string `yaml:"user,omitempty"` Password string `yaml:"password,omitempty"` }
Credentials credentials used to log into docker when deploying a local stack
type Display ¶
type Display = client.EdgeResourceDisplay
type EdgeResource ¶
type EdgeResource struct { Name string Version string `yaml:"version"` Description string `yaml:"description"` InterfaceProtocol string `yaml:"interfaceProtocol"` Interface *EdgeResourceHTTPInterface `yaml:"interface,omitempty"` // TODO: Make this generic to support multiple interfaces protocols Display *Display `yaml:"display,omitempty"` OrchestrationTags []string `yaml:"orchestrationTags"` Custom map[string]interface{} `yaml:"custom"` }
type EdgeResourceHTTPInterface ¶
type EdgeResourceHTTPInterface = client.HTTPEdgeResource
type HTTPEndpoint ¶
type HTTPEndpoint = client.HTTPEndpoint
type IofogUser ¶
type IofogUser struct { Name string `yaml:"name,omitempty"` Surname string `yaml:"surname,omitempty"` Email string `yaml:"email,omitempty"` Password string `yaml:"password,omitempty"` SubscriptionKey string `yaml:"subscriptionKey,omitempty"` }
IofogUser contains information about users registered against a controller
func (*IofogUser) EncodePassword ¶
func (user *IofogUser) EncodePassword()
func (IofogUser) GetRawPassword ¶
type KubeImages ¶
type KubernetesControlPlane ¶
type KubernetesControlPlane struct { KubeConfig string `yaml:"config"` IofogUser IofogUser `yaml:"iofogUser"` ControllerPods []KubernetesController `yaml:"controllerPods,omitempty"` Database Database `yaml:"database"` Auth Auth `yaml:"auth"` Services Services `yaml:"services,omitempty"` Replicas Replicas `yaml:"replicas,omitempty"` Images KubeImages `yaml:"images,omitempty"` Endpoint string `yaml:"endpoint,omitempty"` Controller ControllerConfig `yaml:"controller,omitempty"` }
func UnmarshallKubernetesControlPlane ¶
func UnmarshallKubernetesControlPlane(file []byte) (controlPlane KubernetesControlPlane, err error)
func (*KubernetesControlPlane) AddController ¶
func (cp *KubernetesControlPlane) AddController(baseController Controller) error
func (*KubernetesControlPlane) Clone ¶
func (cp *KubernetesControlPlane) Clone() ControlPlane
func (*KubernetesControlPlane) DeleteController ¶
func (cp *KubernetesControlPlane) DeleteController(name string) error
func (*KubernetesControlPlane) GetController ¶
func (cp *KubernetesControlPlane) GetController(name string) (ret Controller, err error)
func (*KubernetesControlPlane) GetControllers ¶
func (cp *KubernetesControlPlane) GetControllers() (controllers []Controller)
func (*KubernetesControlPlane) GetEndpoint ¶
func (cp *KubernetesControlPlane) GetEndpoint() (string, error)
func (*KubernetesControlPlane) GetUser ¶
func (cp *KubernetesControlPlane) GetUser() IofogUser
func (*KubernetesControlPlane) Sanitize ¶
func (cp *KubernetesControlPlane) Sanitize() (err error)
func (*KubernetesControlPlane) UpdateController ¶
func (cp *KubernetesControlPlane) UpdateController(baseController Controller) error
func (*KubernetesControlPlane) ValidateKubeConfig ¶
func (cp *KubernetesControlPlane) ValidateKubeConfig() error
type KubernetesController ¶
type KubernetesController struct { PodName string `yaml:"podName"` Endpoint string `yaml:"endpoint"` Created string `yaml:"created,omitempty"` Status string `yaml:"status,omitempty"` }
func (*KubernetesController) Clone ¶
func (ctrl *KubernetesController) Clone() Controller
func (*KubernetesController) GetCreatedTime ¶
func (ctrl *KubernetesController) GetCreatedTime() string
func (*KubernetesController) GetEndpoint ¶
func (ctrl *KubernetesController) GetEndpoint() string
func (*KubernetesController) GetName ¶
func (ctrl *KubernetesController) GetName() string
func (*KubernetesController) Sanitize ¶
func (ctrl *KubernetesController) Sanitize() error
func (*KubernetesController) SetName ¶
func (ctrl *KubernetesController) SetName(name string)
type LocalAgent ¶
type LocalAgent struct { Name string `yaml:"name,omitempty"` UUID string `yaml:"uuid,omitempty"` Container Container `yaml:"container,omitempty"` Created string `yaml:"created,omitempty"` Host string `yaml:"host,omitempty"` Config *AgentConfiguration `yaml:"config,omitempty"` ControllerEndpoint string `yaml:"controllerEndpoint,omitempty"` }
func UnmarshallLocalAgent ¶
func UnmarshallLocalAgent(file []byte) (agent LocalAgent, err error)
func (*LocalAgent) Clone ¶
func (agent *LocalAgent) Clone() Agent
func (*LocalAgent) GetConfig ¶
func (agent *LocalAgent) GetConfig() *AgentConfiguration
func (*LocalAgent) GetControllerEndpoint ¶
func (agent *LocalAgent) GetControllerEndpoint() string
func (*LocalAgent) GetCreatedTime ¶
func (agent *LocalAgent) GetCreatedTime() string
func (*LocalAgent) GetHost ¶
func (agent *LocalAgent) GetHost() string
func (*LocalAgent) GetName ¶
func (agent *LocalAgent) GetName() string
func (*LocalAgent) GetUUID ¶
func (agent *LocalAgent) GetUUID() string
func (*LocalAgent) Sanitize ¶
func (agent *LocalAgent) Sanitize() error
func (*LocalAgent) SetConfig ¶
func (agent *LocalAgent) SetConfig(config *AgentConfiguration)
func (*LocalAgent) SetCreatedTime ¶
func (agent *LocalAgent) SetCreatedTime(time string)
func (*LocalAgent) SetHost ¶
func (agent *LocalAgent) SetHost(host string)
func (*LocalAgent) SetName ¶
func (agent *LocalAgent) SetName(name string)
func (*LocalAgent) SetUUID ¶
func (agent *LocalAgent) SetUUID(uuid string)
type LocalControlPlane ¶
type LocalControlPlane struct { IofogUser IofogUser `yaml:"iofogUser"` Controller *LocalController `yaml:"controller,omitempty"` }
func UnmarshallLocalControlPlane ¶
func UnmarshallLocalControlPlane(file []byte) (controlPlane LocalControlPlane, err error)
func (*LocalControlPlane) AddController ¶
func (cp *LocalControlPlane) AddController(baseController Controller) error
func (*LocalControlPlane) Clone ¶
func (cp *LocalControlPlane) Clone() ControlPlane
func (*LocalControlPlane) DeleteController ¶
func (cp *LocalControlPlane) DeleteController(string) error
func (*LocalControlPlane) GetController ¶
func (cp *LocalControlPlane) GetController(name string) (Controller, error)
func (*LocalControlPlane) GetControllers ¶
func (cp *LocalControlPlane) GetControllers() []Controller
func (*LocalControlPlane) GetEndpoint ¶
func (cp *LocalControlPlane) GetEndpoint() (string, error)
func (*LocalControlPlane) GetUser ¶
func (cp *LocalControlPlane) GetUser() IofogUser
func (*LocalControlPlane) Sanitize ¶
func (cp *LocalControlPlane) Sanitize() error
func (*LocalControlPlane) UpdateController ¶
func (cp *LocalControlPlane) UpdateController(baseController Controller) error
type LocalController ¶
type LocalController struct { Name string `yaml:"name"` Endpoint string `yaml:"endpoint"` Container Container `yaml:"container"` Created string `yaml:"created,omitempty"` }
func UnmarshallLocalController ¶
func UnmarshallLocalController(file []byte) (controller LocalController, err error)
func (*LocalController) Clone ¶
func (ctrl *LocalController) Clone() Controller
func (*LocalController) GetCreatedTime ¶
func (ctrl *LocalController) GetCreatedTime() string
func (*LocalController) GetEndpoint ¶
func (ctrl *LocalController) GetEndpoint() string
func (*LocalController) GetName ¶
func (ctrl *LocalController) GetName() string
func (*LocalController) Sanitize ¶
func (ctrl *LocalController) Sanitize() error
func (*LocalController) SetName ¶
func (ctrl *LocalController) SetName(name string)
type Microservice ¶
type Microservice = apps.Microservice
type Namespace ¶
type Namespace struct { Name string `yaml:"name,omitempty"` KubernetesControlPlane *KubernetesControlPlane `yaml:"k8sControlPlane,omitempty"` RemoteControlPlane *RemoteControlPlane `yaml:"remoteControlPlane,omitempty"` LocalControlPlane *LocalControlPlane `yaml:"localControlPlane,omitempty"` LocalAgents []LocalAgent `yaml:"localAgents,omitempty"` RemoteAgents []RemoteAgent `yaml:"remoteAgents,omitempty"` Volumes []Volume `yaml:"volumes,omitempty"` Created string `yaml:"created,omitempty"` // contains filtered or unexported fields }
Namespace is the fundamental type for managing an ECN's resources. Namespace's public getters will all return copies of resources. Namespace's API is intended to be used in parallel, hence the mutex.
func (*Namespace) DeleteAgent ¶
func (*Namespace) DeleteAgents ¶
func (ns *Namespace) DeleteAgents()
func (*Namespace) DeleteControlPlane ¶
func (ns *Namespace) DeleteControlPlane()
func (*Namespace) DeleteController ¶
func (*Namespace) DeleteVolume ¶
func (*Namespace) GetControlPlane ¶
func (ns *Namespace) GetControlPlane() (ControlPlane, error)
GetControlPlane will return a deep copy of the Namespace's ControlPlane
func (*Namespace) GetControllers ¶
func (ns *Namespace) GetControllers() []Controller
GetControllers will return a slice of deep copied Controllers
func (*Namespace) GetVolumes ¶
func (*Namespace) SetControlPlane ¶
func (ns *Namespace) SetControlPlane(baseControlPlane ControlPlane)
func (*Namespace) UpdateAgent ¶
func (*Namespace) UpdateVolume ¶
type NoControlPlaneError ¶
type NoControlPlaneError struct {
// contains filtered or unexported fields
}
func NewNoControlPlaneError ¶
func NewNoControlPlaneError(namespace string) NoControlPlaneError
func (NoControlPlaneError) Error ¶
func (err NoControlPlaneError) Error() string
type NoKubeConfigError ¶
type NoKubeConfigError struct {
// contains filtered or unexported fields
}
func NewNoKubeConfigError ¶
func NewNoKubeConfigError(resource string) *NoKubeConfigError
func (*NoKubeConfigError) Error ¶
func (err *NoKubeConfigError) Error() string
type NoSSHConfigError ¶
type NoSSHConfigError struct {
// contains filtered or unexported fields
}
func NewNoSSHConfigError ¶
func NewNoSSHConfigError(resource string) *NoSSHConfigError
func (*NoSSHConfigError) Error ¶
func (err *NoSSHConfigError) Error() string
type RemoteAgent ¶
type RemoteAgent struct { Name string `yaml:"name"` Host string `yaml:"host"` SSH SSH `yaml:"ssh"` UUID string `yaml:"uuid,omitempty"` Created string `yaml:"created,omitempty"` Package Package `yaml:"package,omitempty"` Config *AgentConfiguration `yaml:"config,omitempty"` Scripts *AgentScripts `yaml:"scripts,omitempty"` ControllerEndpoint string `yaml:"controllerEndpoint,omitempty"` }
func UnmarshallRemoteAgent ¶
func UnmarshallRemoteAgent(file []byte) (agent RemoteAgent, err error)
func (*RemoteAgent) Clone ¶
func (agent *RemoteAgent) Clone() Agent
func (*RemoteAgent) GetConfig ¶
func (agent *RemoteAgent) GetConfig() *AgentConfiguration
func (*RemoteAgent) GetControllerEndpoint ¶
func (agent *RemoteAgent) GetControllerEndpoint() string
func (*RemoteAgent) GetCreatedTime ¶
func (agent *RemoteAgent) GetCreatedTime() string
func (*RemoteAgent) GetHost ¶
func (agent *RemoteAgent) GetHost() string
func (*RemoteAgent) GetName ¶
func (agent *RemoteAgent) GetName() string
func (*RemoteAgent) GetUUID ¶
func (agent *RemoteAgent) GetUUID() string
func (*RemoteAgent) Sanitize ¶
func (agent *RemoteAgent) Sanitize() (err error)
func (*RemoteAgent) SetConfig ¶
func (agent *RemoteAgent) SetConfig(config *AgentConfiguration)
func (*RemoteAgent) SetCreatedTime ¶
func (agent *RemoteAgent) SetCreatedTime(time string)
func (*RemoteAgent) SetHost ¶
func (agent *RemoteAgent) SetHost(host string)
func (*RemoteAgent) SetName ¶
func (agent *RemoteAgent) SetName(name string)
func (*RemoteAgent) SetUUID ¶
func (agent *RemoteAgent) SetUUID(uuid string)
func (*RemoteAgent) ValidateSSH ¶
func (agent *RemoteAgent) ValidateSSH() error
type RemoteControlPlane ¶
type RemoteControlPlane struct { IofogUser IofogUser `yaml:"iofogUser"` Controllers []RemoteController `yaml:"controllers"` Database Database `yaml:"database"` Package Package `yaml:"package,omitempty"` SystemAgent Package `yaml:"systemAgent,omitempty"` SystemMicroservices RemoteSystemMicroservices `yaml:"systemMicroservices,omitempty"` }
func UnmarshallRemoteControlPlane ¶
func UnmarshallRemoteControlPlane(file []byte) (controlPlane RemoteControlPlane, err error)
func (*RemoteControlPlane) AddController ¶
func (cp *RemoteControlPlane) AddController(baseController Controller) error
func (*RemoteControlPlane) Clone ¶
func (cp *RemoteControlPlane) Clone() ControlPlane
func (*RemoteControlPlane) DeleteController ¶
func (cp *RemoteControlPlane) DeleteController(name string) error
func (*RemoteControlPlane) GetController ¶
func (cp *RemoteControlPlane) GetController(name string) (ret Controller, err error)
func (*RemoteControlPlane) GetControllers ¶
func (cp *RemoteControlPlane) GetControllers() (controllers []Controller)
func (*RemoteControlPlane) GetEndpoint ¶
func (cp *RemoteControlPlane) GetEndpoint() (string, error)
func (*RemoteControlPlane) GetUser ¶
func (cp *RemoteControlPlane) GetUser() IofogUser
func (*RemoteControlPlane) Sanitize ¶
func (cp *RemoteControlPlane) Sanitize() (err error)
func (*RemoteControlPlane) UpdateController ¶
func (cp *RemoteControlPlane) UpdateController(baseController Controller) error
type RemoteController ¶
type RemoteController struct { ControllerConfig Name string `yaml:"name"` Host string `yaml:"host"` SSH SSH `yaml:"ssh,omitempty"` Endpoint string `yaml:"endpoint,omitempty"` Created string `yaml:"created,omitempty"` }
func UnmarshallRemoteController ¶
func UnmarshallRemoteController(file []byte) (controller RemoteController, err error)
func (*RemoteController) Clone ¶
func (ctrl *RemoteController) Clone() Controller
func (*RemoteController) GetCreatedTime ¶
func (ctrl *RemoteController) GetCreatedTime() string
func (*RemoteController) GetEndpoint ¶
func (ctrl *RemoteController) GetEndpoint() string
func (*RemoteController) GetName ¶
func (ctrl *RemoteController) GetName() string
func (*RemoteController) Sanitize ¶
func (ctrl *RemoteController) Sanitize() (err error)
func (*RemoteController) SetName ¶
func (ctrl *RemoteController) SetName(name string)
func (*RemoteController) ValidateSSH ¶
func (ctrl *RemoteController) ValidateSSH() error
type RemoteSystemMicroservices ¶
type RemoteSystemMicroservices = install.RemoteSystemMicroservices