Documentation ¶
Overview ¶
Package common exposes package variables that are updated via ldflags compilation
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Version = "0.1.0" BuildStamp = "" BuildRevision = "" PackageType = "CellsSync" PackageLabel = "Cells Sync Client" )
Functions ¶
Types ¶
type CmdContent ¶
CmdContent is a generic container for a Cmd sent via RPC
type ConcreteSyncState ¶
type ConcreteSyncState struct { // Sync Process UUID string Config *config.Task Status model.TaskStatus LastSyncTime time.Time `json:"LastSyncTime,omitempty"` LastOpsTime time.Time `json:"LastOpsTime,omitempty"` LastProcessStatus *model.ProcessingStatus `json:"LastProcessStatus,omitempty"` LeftProcessStatus *model.ProcessingStatus `json:"LeftProcessStatus,omitempty"` RightProcessStatus *model.ProcessingStatus `json:"RightProcessStatus,omitempty"` // Endpoints Current Info LeftInfo *EndpointInfo RightInfo *EndpointInfo }
ConcreteSyncState is used for unmarshaling
type ConfigContent ¶
ConfigContent is a generic container for a Config sent via RPV
type EndpointInfo ¶
type EndpointInfo struct { Stats *model.EndpointRootStat Connected bool WatcherActive bool LastConnection time.Time }
EndpointInfo provides information about a connection to an endpoint
type Message ¶
type Message struct { Type string Content interface{} }
Message is a generic container for RPC
func MessageFromData ¶
MessageFromData parses generic Message from JSON and tries to cast its content to the according type.
type SyncState ¶
type SyncState struct { // Sync Process UUID string Config *config.Task Status model.TaskStatus LastSyncTime time.Time `json:"LastSyncTime,omitempty"` LastOpsTime time.Time `json:"LastOpsTime,omitempty"` LastProcessStatus model.Status `json:"LastProcessStatus,omitempty"` LeftProcessStatus model.Status `json:"LeftProcessStatus,omitempty"` RightProcessStatus model.Status `json:"RightProcessStatus,omitempty"` // Endpoints Current Info LeftInfo *EndpointInfo RightInfo *EndpointInfo }
SyncState provides information about a sync task
type UpdateApplyRequest ¶
UpdateApplyRequest triggers an actual update
func (*UpdateApplyRequest) UpdateMessage ¶
func (u *UpdateApplyRequest) UpdateMessage()
type UpdateApplyStatus ¶
type UpdateApplyStatus struct { ApplyStatus string Package *update.Package Progress float32 Error string }
UpdateApplyStatus is a response to an UpdateApplyRequest
func (*UpdateApplyStatus) UpdateMessage ¶
func (u *UpdateApplyStatus) UpdateMessage()
type UpdateCheckRequest ¶
UpdateCheckRequest triggers a check for updates
func (*UpdateCheckRequest) UpdateMessage ¶
func (u *UpdateCheckRequest) UpdateMessage()
Detect message type
type UpdateCheckStatus ¶
type UpdateCheckStatus struct { CheckStatus string Binaries []*update.Package Error string `json:"error,omitempty"` }
UpdateCheckStatus provides a list of available binaries
func (*UpdateCheckStatus) UpdateMessage ¶
func (u *UpdateCheckStatus) UpdateMessage()
type UpdateMessage ¶
type UpdateMessage interface {
UpdateMessage()
}
Various messages for communicating with service