Documentation
¶
Index ¶
- Constants
- func ReadFile(filename string) (json.RawMessage, int64, error)
- func ReadFileAsArray(filename string) ([]map[string]any, int64, error)
- func SaveFile(data any, filename string) error
- type APIClient
- func (c *APIClient) Delete(ctx context.Context, command string) error
- func (c *APIClient) GetJSON(ctx context.Context, command string, result any) error
- func (c *APIClient) PatchJSON(ctx context.Context, command string, body any) error
- func (c *APIClient) Ping(ctx context.Context) (bool, error)
- func (c *APIClient) PostJSON(ctx context.Context, command string, body any, result any) error
- func (c *APIClient) PutJSON(ctx context.Context, command string, body any) error
- func (c *APIClient) Request(ctx context.Context, command string, requestType RequestType, ...) (map[string]any, error)
- type CacheFile
- type ConnectionState
- type ExecSessionCallback
- func (c *ExecSessionCallback) Close()
- func (c *ExecSessionCallback) GetExecID() string
- func (c *ExecSessionCallback) GetStderrWriter() io.Writer
- func (c *ExecSessionCallback) GetStdin() io.WriteCloser
- func (c *ExecSessionCallback) GetStdinReader() io.Reader
- func (c *ExecSessionCallback) GetStdoutWriter() io.Writer
- func (c *ExecSessionCallback) IsRunning() bool
- func (c *ExecSessionCallback) OnActivation()
- func (c *ExecSessionCallback) OnComplete()
- func (c *ExecSessionCallback) OnError(err error)
- func (c *ExecSessionCallback) SetExecID(execID string)
- func (c *ExecSessionCallback) SetOnCloseHandler(handler func())
- func (c *ExecSessionCallback) SetOnErrorHandler(handler func([]byte))
- func (c *ExecSessionCallback) SetOnInputHandler(handler func([]byte))
- func (c *ExecSessionCallback) SetOnOutputHandler(handler func([]byte))
- func (c *ExecSessionCallback) WriteInput(data []byte) error
- type ExecSessionWebSocketHandler
- type FieldAgent
- func (fa *FieldAgent) Clear()
- func (fa *FieldAgent) Deprovision(clearCredentials bool) error
- func (fa *FieldAgent) DeprovisionWithScope(clearCredentials bool, scope string) error
- func (fa *FieldAgent) FindLatestMicroserviceByUUID(uuid string) *models.Microservice
- func (fa *FieldAgent) GetActiveExecSession(microserviceUUID string) string
- func (fa *FieldAgent) GetContainerConfig(microserviceUUID string) (string, bool)
- func (fa *FieldAgent) GetCurrentMicroservices() []*models.Microservice
- func (fa *FieldAgent) GetExecCallback(microserviceUUID string) *ExecSessionCallback
- func (fa *FieldAgent) GetLatestMicroservices() []*models.Microservice
- func (fa *FieldAgent) GetModuleIndex() int
- func (fa *FieldAgent) GetName() string
- func (fa *FieldAgent) GetRegistry(id int) *models.Registry
- func (fa *FieldAgent) HandleExecSessionClose(microserviceUUID, execID string) error
- func (fa *FieldAgent) HandleExecSessions(microservices []*models.Microservice)
- func (fa *FieldAgent) InstanceGPSConfigUpdated() error
- func (fa *FieldAgent) IsControllerConnected(fromFile bool) bool
- func (fa *FieldAgent) NotProvisioned() bool
- func (fa *FieldAgent) PostStatusHelper()
- func (fa *FieldAgent) Provision(key string) error
- func (fa *FieldAgent) RemoveActiveExecSession(microserviceUUID string)
- func (fa *FieldAgent) RemoveExecCallback(microserviceUUID string)
- func (fa *FieldAgent) SendHWInfoFromHalToController()
- func (fa *FieldAgent) SendUSBInfoFromHalToController()
- func (fa *FieldAgent) SetActiveExecSession(microserviceUUID, execID string)
- func (fa *FieldAgent) SetCurrentMicroservices(microservices []*models.Microservice)
- func (fa *FieldAgent) SetExecCallback(microserviceUUID string, callback *ExecSessionCallback)
- func (fa *FieldAgent) SetOnConfigsUpdate(callback func(map[string]string) error)
- func (fa *FieldAgent) SetOnMicroservicesUpdate(callback func([]*models.Microservice) error)
- func (fa *FieldAgent) SetOnRegistriesUpdate(callback func([]*models.Registry) error)
- func (fa *FieldAgent) SetProcessManager(pm *processmanager.ProcessManager)
- func (fa *FieldAgent) Start() error
- func (fa *FieldAgent) Stop() error
- func (fa *FieldAgent) Update() error
- type LogConnectionState
- type LogSession
- type LogSessionInfo
- type LogSessionManager
- func (lsm *LogSessionManager) FetchLogSessions(ctx context.Context) ([]*LogSession, error)
- func (lsm *LogSessionManager) HandleLogSessions(fetchedSessions []*LogSession)
- func (lsm *LogSessionManager) SetEngine(e engine.ContainerEngine)
- func (lsm *LogSessionManager) SetProcessManager(pm *processmanager.ProcessManager)
- func (lsm *LogSessionManager) StartLogStreamingOnActivation(sessionID string, tailConfigMap map[string]any)
- func (lsm *LogSessionManager) StartWorker(ctx context.Context)
- func (lsm *LogSessionManager) StopLogSession(sessionID string)
- type LogSessionWebSocketHandler
- func (h *LogSessionWebSocketHandler) Connect() error
- func (h *LogSessionWebSocketHandler) Disconnect()
- func (h *LogSessionWebSocketHandler) IsActive() bool
- func (h *LogSessionWebSocketHandler) IsConnected() bool
- func (h *LogSessionWebSocketHandler) SendMessage(msgType byte, data []byte) error
- func (h *LogSessionWebSocketHandler) SetLogSessionManager(lsm *LogSessionManager)
- type Orchestrator
- func (o *Orchestrator) GetControllerCert(ctx context.Context) (string, error)
- func (o *Orchestrator) GetJSON(ctx context.Context, command string, result any) error
- func (o *Orchestrator) Ping(ctx context.Context) (bool, error)
- func (o *Orchestrator) Provision(ctx context.Context, key string) (map[string]any, error)
- func (o *Orchestrator) Request(ctx context.Context, command string, requestType RequestType, ...) (map[string]any, error)
- func (o *Orchestrator) Update() error
- type RequestType
- type State
- func (s *State) GetControllerStatus() models.ControllerStatus
- func (s *State) GetLastCommandTime() int64
- func (s *State) GetLastGetChangesList() int64
- func (s *State) IsConnected() bool
- func (s *State) IsControllerVerified() bool
- func (s *State) IsInitialization() bool
- func (s *State) SetConnected(connected bool)
- func (s *State) SetControllerStatus(status models.ControllerStatus)
- func (s *State) SetControllerVerified(verified bool)
- func (s *State) SetInitialization(init bool)
- func (s *State) SetLastCommandTime(timestamp int64)
- func (s *State) SetLastGetChangesList(timestamp int64)
- func (s *State) UpdateLastCommandTime()
Constants ¶
const ( DeprovisionScopeAll = "all" DeprovisionScopeLocal = "local" )
const ( ExecTypeStdin byte = 0 ExecTypeStdout byte = 1 ExecTypeStderr byte = 2 ExecTypeControl byte = 3 ExecTypeClose byte = 4 ExecTypeActivation byte = 5 )
ExecMessageType constants
const ( LogTypeLogLine byte = 6 LogTypeLogStart byte = 7 LogTypeLogStop byte = 8 LogTypeLogError byte = 9 )
LogMessageType constants
Variables ¶
This section is empty.
Functions ¶
func ReadFile ¶
func ReadFile(filename string) (json.RawMessage, int64, error)
ReadFile reads data from a cache file and validates checksum
func ReadFileAsArray ¶
ReadFileAsArray reads a cached file as a JSON array
Types ¶
type APIClient ¶
type APIClient struct {
// contains filtered or unexported fields
}
APIClient handles all HTTP communication with the controller
func NewAPIClient ¶
NewAPIClient creates a new API client for controller communication
type CacheFile ¶
type CacheFile struct {
Checksum string `json:"checksum"`
Timestamp int64 `json:"timestamp"`
Data json.RawMessage `json:"data"`
}
CacheFile represents a cached file with checksum and timestamp
type ConnectionState ¶
type ConnectionState int
ConnectionState represents the WebSocket connection state
const ( StateDisconnected ConnectionState = iota StateConnecting StateConnected StatePending // Connected but waiting for user StateActive // Connected and paired with user )
type ExecSessionCallback ¶
type ExecSessionCallback struct {
// contains filtered or unexported fields
}
ExecSessionCallback handles Docker exec session I/O and bridges it to WebSocket
func NewExecSessionCallback ¶
func NewExecSessionCallback(microserviceUUID, execID string) *ExecSessionCallback
NewExecSessionCallback creates a new ExecSessionCallback
func (*ExecSessionCallback) Close ¶
func (c *ExecSessionCallback) Close()
Close closes the exec session callback
func (*ExecSessionCallback) GetExecID ¶
func (c *ExecSessionCallback) GetExecID() string
GetExecID returns the exec session ID
func (*ExecSessionCallback) GetStderrWriter ¶
func (c *ExecSessionCallback) GetStderrWriter() io.Writer
GetStderrWriter returns the stderr writer for ProcessManager
func (*ExecSessionCallback) GetStdin ¶
func (c *ExecSessionCallback) GetStdin() io.WriteCloser
GetStdin returns the stdin writer
func (*ExecSessionCallback) GetStdinReader ¶
func (c *ExecSessionCallback) GetStdinReader() io.Reader
GetStdinReader returns the stdin reader for ProcessManager
func (*ExecSessionCallback) GetStdoutWriter ¶
func (c *ExecSessionCallback) GetStdoutWriter() io.Writer
GetStdoutWriter returns the stdout writer for ProcessManager
func (*ExecSessionCallback) IsRunning ¶
func (c *ExecSessionCallback) IsRunning() bool
IsRunning returns whether the callback is running
func (*ExecSessionCallback) OnActivation ¶
func (c *ExecSessionCallback) OnActivation()
OnActivation is called when the exec session is activated
func (*ExecSessionCallback) OnComplete ¶
func (c *ExecSessionCallback) OnComplete()
OnComplete is called when the exec session completes
func (*ExecSessionCallback) OnError ¶
func (c *ExecSessionCallback) OnError(err error)
OnError is called when the exec session encounters an error
func (*ExecSessionCallback) SetExecID ¶
func (c *ExecSessionCallback) SetExecID(execID string)
SetExecID sets the exec session ID
func (*ExecSessionCallback) SetOnCloseHandler ¶
func (c *ExecSessionCallback) SetOnCloseHandler(handler func())
SetOnCloseHandler sets the handler for close events
func (*ExecSessionCallback) SetOnErrorHandler ¶
func (c *ExecSessionCallback) SetOnErrorHandler(handler func([]byte))
SetOnErrorHandler sets the handler for error data
func (*ExecSessionCallback) SetOnInputHandler ¶
func (c *ExecSessionCallback) SetOnInputHandler(handler func([]byte))
SetOnInputHandler sets the handler for input data
func (*ExecSessionCallback) SetOnOutputHandler ¶
func (c *ExecSessionCallback) SetOnOutputHandler(handler func([]byte))
SetOnOutputHandler sets the handler for output data
func (*ExecSessionCallback) WriteInput ¶
func (c *ExecSessionCallback) WriteInput(data []byte) error
WriteInput writes input data to stdin
type ExecSessionWebSocketHandler ¶
type ExecSessionWebSocketHandler struct {
// contains filtered or unexported fields
}
ExecSessionWebSocketHandler manages the WebSocket connection for exec sessions
func GetExecSessionWebSocketHandler ¶
func GetExecSessionWebSocketHandler(microserviceUUID string) *ExecSessionWebSocketHandler
GetExecSessionWebSocketHandler gets or creates an ExecSessionWebSocketHandler for a microservice
func (*ExecSessionWebSocketHandler) Connect ¶
func (h *ExecSessionWebSocketHandler) Connect() error
Connect establishes the WebSocket connection to the controller
func (*ExecSessionWebSocketHandler) Disconnect ¶
func (h *ExecSessionWebSocketHandler) Disconnect()
Disconnect closes the WebSocket connection
func (*ExecSessionWebSocketHandler) IsActive ¶
func (h *ExecSessionWebSocketHandler) IsActive() bool
IsActive returns whether the exec session is active
func (*ExecSessionWebSocketHandler) IsConnected ¶
func (h *ExecSessionWebSocketHandler) IsConnected() bool
IsConnected returns whether the WebSocket is connected
func (*ExecSessionWebSocketHandler) SendMessage ¶
func (h *ExecSessionWebSocketHandler) SendMessage(msgType byte, data []byte) error
SendMessage sends a message to the controller
type FieldAgent ¶
type FieldAgent struct {
// contains filtered or unexported fields
}
FieldAgent handles all communication with the fog controller
func GetInstance ¶
func GetInstance() *FieldAgent
GetInstance returns the singleton FieldAgent instance
func (*FieldAgent) Deprovision ¶
func (fa *FieldAgent) Deprovision(clearCredentials bool) error
Deprovision deprovisions the agent clearCredentials=true skip controller request
func (*FieldAgent) DeprovisionWithScope ¶
func (fa *FieldAgent) DeprovisionWithScope(clearCredentials bool, scope string) error
DeprovisionWithScope deprovisions the agent and controls cleanup scope. scope=all removes managed+local workloads; scope=local preserves local workloads.
func (*FieldAgent) FindLatestMicroserviceByUUID ¶
func (fa *FieldAgent) FindLatestMicroserviceByUUID(uuid string) *models.Microservice
FindLatestMicroserviceByUUID finds a microservice by UUID
func (*FieldAgent) GetActiveExecSession ¶
func (fa *FieldAgent) GetActiveExecSession(microserviceUUID string) string
GetActiveExecSession returns the active exec session ID for a microservice
func (*FieldAgent) GetContainerConfig ¶
func (fa *FieldAgent) GetContainerConfig(microserviceUUID string) (string, bool)
GetContainerConfig returns the container config string for a microservice UUID
func (*FieldAgent) GetCurrentMicroservices ¶
func (fa *FieldAgent) GetCurrentMicroservices() []*models.Microservice
GetCurrentMicroservices returns the current microservices (same as latest for now)
func (*FieldAgent) GetExecCallback ¶
func (fa *FieldAgent) GetExecCallback(microserviceUUID string) *ExecSessionCallback
GetExecCallback gets the exec callback for a microservice
func (*FieldAgent) GetLatestMicroservices ¶
func (fa *FieldAgent) GetLatestMicroservices() []*models.Microservice
GetLatestMicroservices returns the latest microservices from the controller
func (*FieldAgent) GetModuleIndex ¶
func (fa *FieldAgent) GetModuleIndex() int
GetModuleIndex returns the module index
func (*FieldAgent) GetRegistry ¶
func (fa *FieldAgent) GetRegistry(id int) *models.Registry
GetRegistry returns a registry by ID
func (*FieldAgent) HandleExecSessionClose ¶
func (fa *FieldAgent) HandleExecSessionClose(microserviceUUID, execID string) error
HandleExecSessionClose handles closing an exec session
func (*FieldAgent) HandleExecSessions ¶
func (fa *FieldAgent) HandleExecSessions(microservices []*models.Microservice)
HandleExecSessions handles exec session changes for microservices
func (*FieldAgent) InstanceGPSConfigUpdated ¶
func (fa *FieldAgent) InstanceGPSConfigUpdated() error
InstanceGPSConfigUpdated sends dedicated GPS config updates to the controller.
func (*FieldAgent) IsControllerConnected ¶
func (fa *FieldAgent) IsControllerConnected(fromFile bool) bool
IsControllerConnected checks if the controller is connected
func (*FieldAgent) NotProvisioned ¶
func (fa *FieldAgent) NotProvisioned() bool
NotProvisioned checks if the agent is not provisioned
func (*FieldAgent) PostStatusHelper ¶
func (fa *FieldAgent) PostStatusHelper()
PostStatusHelper posts the fog status to the controller Exported for use by Edge Guard to immediately notify controller of hardware changes
func (*FieldAgent) Provision ¶
func (fa *FieldAgent) Provision(key string) error
Provision provisions the agent with the controller
func (*FieldAgent) RemoveActiveExecSession ¶
func (fa *FieldAgent) RemoveActiveExecSession(microserviceUUID string)
RemoveActiveExecSession removes the active exec session for a microservice
func (*FieldAgent) RemoveExecCallback ¶
func (fa *FieldAgent) RemoveExecCallback(microserviceUUID string)
RemoveExecCallback removes the exec callback for a microservice
func (*FieldAgent) SendHWInfoFromHalToController ¶
func (fa *FieldAgent) SendHWInfoFromHalToController()
SendHWInfoFromHalToController sends hardware information from HAL to the controller
func (*FieldAgent) SendUSBInfoFromHalToController ¶
func (fa *FieldAgent) SendUSBInfoFromHalToController()
SendUSBInfoFromHalToController sends USB information from HAL to the controller
func (*FieldAgent) SetActiveExecSession ¶
func (fa *FieldAgent) SetActiveExecSession(microserviceUUID, execID string)
SetActiveExecSession sets the active exec session ID for a microservice
func (*FieldAgent) SetCurrentMicroservices ¶
func (fa *FieldAgent) SetCurrentMicroservices(microservices []*models.Microservice)
SetCurrentMicroservices sets the current microservices
func (*FieldAgent) SetExecCallback ¶
func (fa *FieldAgent) SetExecCallback(microserviceUUID string, callback *ExecSessionCallback)
SetExecCallback sets the exec callback for a microservice
func (*FieldAgent) SetOnConfigsUpdate ¶
func (fa *FieldAgent) SetOnConfigsUpdate(callback func(map[string]string) error)
SetOnConfigsUpdate sets the callback for configs updates
func (*FieldAgent) SetOnMicroservicesUpdate ¶
func (fa *FieldAgent) SetOnMicroservicesUpdate(callback func([]*models.Microservice) error)
SetOnMicroservicesUpdate sets the callback for microservices updates
func (*FieldAgent) SetOnRegistriesUpdate ¶
func (fa *FieldAgent) SetOnRegistriesUpdate(callback func([]*models.Registry) error)
SetOnRegistriesUpdate sets the callback for registries updates
func (*FieldAgent) SetProcessManager ¶
func (fa *FieldAgent) SetProcessManager(pm *processmanager.ProcessManager)
SetProcessManager sets the ProcessManager reference
func (*FieldAgent) Start ¶
func (fa *FieldAgent) Start() error
Start starts the FieldAgent and all background workers
func (*FieldAgent) Stop ¶
func (fa *FieldAgent) Stop() error
Stop stops the FieldAgent and all background workers
func (*FieldAgent) Update ¶
func (fa *FieldAgent) Update() error
Update updates the FieldAgent when configuration changes. Workers are NOT restarted — they use dynamic timers that re-read config on every tick, so they pick up new frequencies automatically. NewAPIClient() is moved into the background goroutine so the SIGHUP handler goroutine is never blocked by DNS resolution for the new controller URL.
type LogConnectionState ¶
type LogConnectionState int
LogConnectionState represents the WebSocket connection state
const ( LogStateDisconnected LogConnectionState = iota LogStateConnecting LogStateConnected LogStatePending // Connected but waiting for LOG_START LogStateActive // Connected and streaming logs )
type LogSession ¶
type LogSession struct {
SessionID string `json:"sessionId"`
MicroserviceUUID string `json:"microserviceUuid,omitempty"`
IofogUUID string `json:"iofogUuid,omitempty"`
Status string `json:"status"` // ACTIVE, PENDING, etc.
}
LogSession represents a log session from the controller
type LogSessionInfo ¶
type LogSessionInfo struct {
Session *LogSession
ContainerID string
IsStreaming bool
}
LogSessionInfo tracks information about an active log session
type LogSessionManager ¶
type LogSessionManager struct {
// contains filtered or unexported fields
}
LogSessionManager manages active log sessions
func GetLogSessionManager ¶
func GetLogSessionManager() *LogSessionManager
GetLogSessionManager returns the singleton LogSessionManager instance.
func (*LogSessionManager) FetchLogSessions ¶
func (lsm *LogSessionManager) FetchLogSessions(ctx context.Context) ([]*LogSession, error)
FetchLogSessions fetches log sessions from the controller
func (*LogSessionManager) HandleLogSessions ¶
func (lsm *LogSessionManager) HandleLogSessions(fetchedSessions []*LogSession)
HandleLogSessions handles fetched log sessions from controller
func (*LogSessionManager) SetEngine ¶
func (lsm *LogSessionManager) SetEngine(e engine.ContainerEngine)
SetEngine sets the ContainerEngine used to look up containers and tail their logs. Must be called before log session streaming starts (from supervisor after engine init).
func (*LogSessionManager) SetProcessManager ¶
func (lsm *LogSessionManager) SetProcessManager(pm *processmanager.ProcessManager)
SetProcessManager sets the ProcessManager instance (called by supervisor).
func (*LogSessionManager) StartLogStreamingOnActivation ¶
func (lsm *LogSessionManager) StartLogStreamingOnActivation(sessionID string, tailConfigMap map[string]any)
StartLogStreamingOnActivation starts log streaming when WebSocket becomes active This method is called from LogSessionWebSocketHandler when it receives LOG_START
func (*LogSessionManager) StartWorker ¶
func (lsm *LogSessionManager) StartWorker(ctx context.Context)
StartWorker starts the background worker that periodically fetches and handles log sessions
func (*LogSessionManager) StopLogSession ¶
func (lsm *LogSessionManager) StopLogSession(sessionID string)
StopLogSession stops a log session (thread-safe)
type LogSessionWebSocketHandler ¶
type LogSessionWebSocketHandler struct {
// contains filtered or unexported fields
}
LogSessionWebSocketHandler manages the WebSocket connection for log sessions
func GetLogSessionWebSocketHandler ¶
func GetLogSessionWebSocketHandler(sessionID, microserviceUUID, iofogUUID string, isMicroserviceLog bool) *LogSessionWebSocketHandler
GetLogSessionWebSocketHandler gets or creates a LogSessionWebSocketHandler for a session
func (*LogSessionWebSocketHandler) Connect ¶
func (h *LogSessionWebSocketHandler) Connect() error
Connect establishes the WebSocket connection to the controller
func (*LogSessionWebSocketHandler) Disconnect ¶
func (h *LogSessionWebSocketHandler) Disconnect()
Disconnect closes the WebSocket connection
func (*LogSessionWebSocketHandler) IsActive ¶
func (h *LogSessionWebSocketHandler) IsActive() bool
IsActive returns whether the log session is active
func (*LogSessionWebSocketHandler) IsConnected ¶
func (h *LogSessionWebSocketHandler) IsConnected() bool
IsConnected returns whether the WebSocket is connected
func (*LogSessionWebSocketHandler) SendMessage ¶
func (h *LogSessionWebSocketHandler) SendMessage(msgType byte, data []byte) error
SendMessage sends a log message to the controller
func (*LogSessionWebSocketHandler) SetLogSessionManager ¶
func (h *LogSessionWebSocketHandler) SetLogSessionManager(lsm *LogSessionManager)
SetLogSessionManager sets the LogSessionManager reference
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
Orchestrator wraps APIClient with additional methods
func NewOrchestrator ¶
func NewOrchestrator(apiClient *APIClient) *Orchestrator
NewOrchestrator creates a new Orchestrator instance
func (*Orchestrator) GetControllerCert ¶
func (o *Orchestrator) GetControllerCert(ctx context.Context) (string, error)
GetControllerCert gets the controller certificate from the controller Note: This uses an insecure connection to get the certificate when current cert is invalid
func (*Orchestrator) Ping ¶
func (o *Orchestrator) Ping(ctx context.Context) (bool, error)
Ping pings the IOFog controller
func (*Orchestrator) Request ¶
func (o *Orchestrator) Request(ctx context.Context, command string, requestType RequestType, queryParams map[string]string, body any) (map[string]any, error)
Request performs an HTTP request (wrapper around APIClient.Request)
func (*Orchestrator) Update ¶
func (o *Orchestrator) Update() error
Update updates the orchestrator configuration
type RequestType ¶
type RequestType string
RequestType represents HTTP request types
const ( GET RequestType = "GET" POST RequestType = "POST" PUT RequestType = "PUT" PATCH RequestType = "PATCH" DELETE RequestType = "DELETE" )
type State ¶
type State struct {
// contains filtered or unexported fields
}
State represents the current state of the FieldAgent
func (*State) GetControllerStatus ¶
func (s *State) GetControllerStatus() models.ControllerStatus
GetControllerStatus returns the controller status
func (*State) GetLastCommandTime ¶
GetLastCommandTime returns the last command time
func (*State) GetLastGetChangesList ¶
GetLastGetChangesList returns the last time changes were retrieved
func (*State) IsConnected ¶
IsConnected returns whether we're connected to the controller
func (*State) IsControllerVerified ¶
IsControllerVerified returns whether the controller is verified
func (*State) IsInitialization ¶
IsInitialization returns whether we're in initialization phase
func (*State) SetConnected ¶
SetConnected sets the connected status
func (*State) SetControllerStatus ¶
func (s *State) SetControllerStatus(status models.ControllerStatus)
SetControllerStatus sets the controller status
func (*State) SetControllerVerified ¶
SetControllerVerified sets the controller verified flag
func (*State) SetInitialization ¶
SetInitialization sets the initialization flag
func (*State) SetLastCommandTime ¶
SetLastCommandTime sets the last command time
func (*State) SetLastGetChangesList ¶
SetLastGetChangesList sets the last time changes were retrieved
func (*State) UpdateLastCommandTime ¶
func (s *State) UpdateLastCommandTime()
UpdateLastCommandTime updates the last command time to current time