Documentation
¶
Index ¶
- Variables
- func IsNoControlPlaneError(err error) bool
- type Agent
- type AgentConfiguration
- type AgentInfo
- type AgentScripts
- type AgentStatus
- type Application
- type ApplicationTemplate
- type Auth
- type CACreateRequest
- type CAInfo
- type CertificateCACreateResponse
- type CertificateChainItem
- type CertificateCreateCA
- type CertificateCreateRequest
- type CertificateCreateResponse
- type CertificateData
- type CertificateInfo
- type ClusterService
- type ConfigMap
- type Container
- type ControlPlane
- type Controller
- type ControllerIngress
- type ControllerScripts
- type Credentials
- type Database
- type Display
- type EdgeResource
- type EdgeResourceHTTPInterface
- type Events
- type HTTPEndpoint
- type Https
- type Ingress
- type Ingresses
- type IofogUser
- type K8SControllerConfig
- 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) UpdateUserTokens(accessToken, refreshToken string) IofogUser
- 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
- func (cp *LocalControlPlane) UpdateUserTokens(accessToken, refreshToken string) IofogUser
- 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 OfflineImage
- type OfflineImageAuth
- 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 RemoteContainer
- 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
- func (cp *RemoteControlPlane) UpdateUserTokens(accessToken, refreshToken string) IofogUser
- 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 RemoteControllerConfig
- type RemoteSystemMicroservices
- type Replicas
- type Route
- type RouterIngress
- type SSH
- type Secret
- type Service
- type Services
- type SiteCertificate
- type SystemAgentConfig
- type Volume
- type VolumeMount
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 AgentInfo ¶ added in v1.4.0
type AgentInfo struct {
AgentConfiguration
AgentStatus
}
type AgentScripts ¶
type AgentScripts struct {
install.AgentProcedures `yaml:",inline"`
Directory string `yaml:"dir"` // Location of scripts
}
type AgentStatus ¶ added in v1.4.0
type AgentStatus struct {
LastActive int64 `json:"lastActive" yaml:"lastActive"`
DaemonStatus string `json:"daemonStatus" yaml:"daemonStatus"`
SecurityStatus string `json:"securityStatus" yaml:"securityStatus"`
SecurityViolationInfo string `json:"securityViolationInfo" yaml:"securityViolationInfo"`
WarningMessage string `json:"warningMessage" yaml:"warningMessage"`
UptimeMs int64 `json:"daemonOperatingDuration" yaml:"uptime"`
MemoryUsage float64 `json:"memoryUsage" yaml:"memoryUsage"`
DiskUsage float64 `json:"diskUsage" yaml:"diskUsage"`
CPUUsage float64 `json:"cpuUsage" yaml:"cpuUsage"`
SystemAvailableMemory float64 `json:"systemAvailableMemory" yaml:"systemAvailableMemory"`
SystemAvailableDisk float64 `json:"systemAvailableDisk" yaml:"systemAvailableDisk"`
SystemTotalCPU float64 `json:"systemTotalCPU" yaml:"systemTotalCPU"`
MemoryViolation string `json:"memoryViolation" yaml:"memoryViolation"`
DiskViolation string `json:"diskViolation" yaml:"diskViolation"`
CPUViolation string `json:"cpuViolation" yaml:"cpuViolation"`
RepositoryStatus string `json:"repositoryStatus" yaml:"repositoryStatus"`
LastStatusTimeMsUTC int64 `json:"lastStatusTime" yaml:"lastStatusTime"`
IPAddress string `json:"ipAddress" yaml:"ipAddress"`
IPAddressExternal string `json:"ipAddressExternal" yaml:"ipAddressExternal"`
ProcessedMessaged int64 `json:"processedMessages" yaml:"ProcessedMessages"`
MessageSpeed float64 `json:"messageSpeed" yaml:"messageSpeed"`
LastCommandTimeMsUTC int64 `json:"lastCommandTime" yaml:"lastCommandTime"`
Version string `json:"version" yaml:"version"`
IsReadyToUpgrade bool `json:"isReadyToUpgrade" yaml:"isReadyToUpgrade"`
IsReadyToRollback bool `json:"isReadyToRollback" yaml:"isReadyToRollback"`
Tunnel string `json:"tunnel" yaml:"tunnel"`
VolumeMounts []VolumeMount
GpsStatus string `json:"gpsStatus" yaml:"gpsStatus"`
}
type Application ¶
type Application = apps.Application
type ApplicationTemplate ¶
type ApplicationTemplate = apps.ApplicationTemplate
type CACreateRequest ¶ added in v1.4.0
type CACreateRequest struct {
Name string `json:"name" yaml:"name"`
Subject string `json:"subject,omitempty" yaml:"subject,omitempty"`
Expiration int `json:"expiration,omitempty" yaml:"expiration,omitempty"`
Type string `json:"type" yaml:"type" yaml:"type"`
SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"`
}
type CAInfo ¶ added in v1.4.0
type CAInfo struct {
// Name string `json:"name"`
Subject string `json:"subject" yaml:"subject"`
IsCA bool `json:"isCA" yaml:"isCA"`
ValidFrom time.Time `json:"validFrom" yaml:"validFrom"`
ValidTo time.Time `json:"validTo" yaml:"validTo"`
SerialNumber string `json:"serialNumber" yaml:"serialNumber"`
Certificate string `json:"certificate" yaml:"certificate"`
PrivateKey string `json:"privateKey" yaml:"privateKey"`
}
type CertificateCACreateResponse ¶ added in v1.4.0
type CertificateChainItem ¶ added in v1.4.0
type CertificateCreateCA ¶ added in v1.4.0
type CertificateCreateRequest ¶ added in v1.4.0
type CertificateCreateRequest struct {
Name string `json:"name" yaml:"name"`
Subject string `json:"subject" yaml:"subject"`
Hosts string `json:"hosts" yaml:"hosts"`
Expiration int `json:"expiration,omitempty" yaml:"expiration,omitempty"`
CA CertificateCreateCA `json:"ca" yaml:"ca"`
}
Certificate Types
type CertificateCreateResponse ¶ added in v1.4.0
type CertificateCreateResponse struct {
Name string `json:"name" yaml:"name"`
Subject string `json:"subject" yaml:"subject"`
Hosts string `json:"hosts" yaml:"hosts"`
ValidFrom time.Time `json:"validFrom" yaml:"validFrom"`
ValidTo time.Time `json:"validTo" yaml:"validTo"`
CAName string `json:"caName" yaml:"caName"`
}
type CertificateData ¶ added in v1.4.0
type CertificateInfo ¶ added in v1.4.0
type CertificateInfo struct {
// Name string `json:"name"`
Subject string `json:"subject" yaml:"subject"`
Hosts string `json:"hosts" yaml:"hosts"`
IsCA bool `json:"isCA" yaml:"isCA"`
ValidFrom time.Time `json:"validFrom" yaml:"validFrom"`
ValidTo time.Time `json:"validTo" yaml:"validTo"`
SerialNumber string `json:"serialNumber" yaml:"serialNumber"`
CAName *string `json:"caName" yaml:"caName"`
// CertificateChain []CertificateChainItem `json:"certificateChain" yaml:"certificateChain"`
DaysRemaining int `json:"daysRemaining" yaml:"daysRemaining"`
IsExpired bool `json:"isExpired" yaml:"isExpired"`
Certificate string `json:"certificate" yaml:"certificate"`
PrivateKey string `json:"privateKey" yaml:"privateKey"`
}
type ClusterService ¶ added in v1.4.0
type ClusterService struct {
Name string `yaml:"name,omitempty"`
Tags []string `yaml:"tags,omitempty"`
Type string `yaml:"type,omitempty"`
Resource string `yaml:"resource,omitempty"`
TargetPort int `yaml:"targetPort,omitempty"`
BridgePort int `yaml:"bridgePort,omitempty"`
DefaultBridge string `yaml:"defaultBridge,omitempty"`
K8sType string `yaml:"k8sType,omitempty"`
ServiceEndpoint string `yaml:"serviceEndpoint,omitempty"`
ServicePort int `yaml:"servicePort,omitempty"`
}
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
// UpdateUserSubscriptionKey(string) IofogUser
UpdateUserTokens(string, string) 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 ControllerIngress ¶ added in v1.2.5
type ControllerScripts ¶ added in v1.4.6
type ControllerScripts struct {
install.ControllerProcedures `yaml:",inline"`
Directory string `yaml:"dir"` // Location of scripts
}
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 Database ¶
type Database struct {
Provider string `yaml:"provider,omitempty"`
Host string `yaml:"host,omitempty"`
Port int `yaml:"port,omitempty"`
User string `yaml:"user,omitempty"`
Password string `yaml:"password,omitempty"`
DatabaseName string `yaml:"databaseName,omitempty"`
SSL *bool `yaml:"ssl,omitempty"`
CA *string `yaml:"ca,omitempty"`
}
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 Ingresses ¶ added in v1.2.5
type Ingresses struct {
Controller ControllerIngress `yaml:"controller,omitempty"`
Router RouterIngress `yaml:"router,omitempty"`
}
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"`
AccessToken string `yaml:"accessToken,omitempty"`
RefreshToken string `yaml:"refreshToken,omitempty"`
}
IofogUser contains information about users registered against a controller
func (*IofogUser) EncodePassword ¶
func (user *IofogUser) EncodePassword()
func (IofogUser) GetRawPassword ¶
type K8SControllerConfig ¶ added in v1.4.0
type K8SControllerConfig struct {
PidBaseDir string `yaml:"pidBaseDir,omitempty"`
EcnViewerPort int `yaml:"ecnViewerPort,omitempty"`
EcnViewerURL string `yaml:"ecnViewerUrl,omitempty"`
LogLevel string `yaml:"logLevel,omitempty"`
Https *bool `yaml:"https,omitempty"`
SecretName string `yaml:"secretName,omitempty"`
}
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"`
Events Events `yaml:"events,omitempty"`
Services Services `yaml:"services,omitempty"`
Replicas Replicas `yaml:"replicas,omitempty"`
Images KubeImages `yaml:"images,omitempty"`
Endpoint string `yaml:"endpoint,omitempty"`
Controller K8SControllerConfig `yaml:"controller,omitempty"`
Ingresses Ingresses `yaml:"ingresses,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) UpdateUserTokens ¶ added in v1.3.2
func (cp *KubernetesControlPlane) UpdateUserTokens(accessToken, refreshToken string) IofogUser
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"`
Database Database `yaml:"database"`
Auth Auth `yaml:"auth"`
Events Events `yaml:"events,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
func (*LocalControlPlane) UpdateUserTokens ¶ added in v1.3.2
func (cp *LocalControlPlane) UpdateUserTokens(accessToken, refreshToken string) IofogUser
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 OfflineImage ¶ added in v1.4.8
type OfflineImage struct {
Name string `json:"name" yaml:"name"`
X86Image string `json:"x86,omitempty" yaml:"x86,omitempty"`
ArmImage string `json:"arm,omitempty" yaml:"arm,omitempty"`
Auth *OfflineImageAuth `json:"auth,omitempty" yaml:"auth,omitempty"`
Agents []string `json:"agent,omitempty" yaml:"agent,omitempty"`
}
type OfflineImageAuth ¶ added in v1.4.8
type Package ¶
type Package struct {
Version string `yaml:"version,omitempty"`
Container RemoteContainer
}
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 RemoteContainer ¶ added in v1.3.6
type RemoteContainer struct {
Image string `yaml:"image,omitempty"`
}
type RemoteControlPlane ¶
type RemoteControlPlane struct {
IofogUser IofogUser `yaml:"iofogUser"`
Controllers []RemoteController `yaml:"controllers"`
Database Database `yaml:"database"`
Auth Auth `yaml:"auth"`
Events Events `yaml:"events,omitempty"`
Package Package `yaml:"package,omitempty"`
SystemMicroservices RemoteSystemMicroservices `yaml:"systemMicroservices,omitempty"`
Endpoint string `yaml:"endpoint,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
func (*RemoteControlPlane) UpdateUserTokens ¶ added in v1.3.2
func (cp *RemoteControlPlane) UpdateUserTokens(accessToken, refreshToken string) IofogUser
type RemoteController ¶
type RemoteController struct {
RemoteControllerConfig `yaml:",inline"`
Name string `yaml:"name"`
Host string `yaml:"host"`
SSH SSH `yaml:"ssh,omitempty"`
Endpoint string `yaml:"endpoint,omitempty"`
Created string `yaml:"created,omitempty"`
Scripts *ControllerScripts `yaml:"scripts,omitempty"`
SystemAgent *SystemAgentConfig `yaml:"systemAgent,omitempty"` // Per-controller system agent config
}
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 RemoteControllerConfig ¶ added in v1.4.0
type RemoteControllerConfig struct {
PidBaseDir string `yaml:"pidBaseDir,omitempty"`
EcnViewerPort int `yaml:"ecnViewerPort,omitempty"`
EcnViewerURL string `yaml:"ecnViewerUrl,omitempty"`
LogLevel string `yaml:"logLevel,omitempty"`
Https *Https `yaml:"https,omitempty"`
SiteCA *SiteCertificate `yaml:"siteCA,omitempty"` // router site CA
LocalCA *SiteCertificate `yaml:"localCA,omitempty"` // router local CA
}
type RemoteSystemMicroservices ¶
type RemoteSystemMicroservices = install.RemoteSystemMicroservices
type RouterIngress ¶ added in v1.2.5
type SiteCertificate ¶ added in v1.4.0
type SystemAgentConfig ¶ added in v1.4.6
type SystemAgentConfig struct {
Package Package `yaml:"package,omitempty"`
Scripts *AgentScripts `yaml:"scripts,omitempty"` // Custom scripts
AgentConfiguration *AgentConfiguration `yaml:"config,omitempty"` // Configurable config
}