Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotRunning = errors.New("controller is not running")
Functions ¶
func New ¶
func New() (controller.Controller, error)
New allocates instance of Software-As-A-Service (aka WSS) controller
Types ¶
type CloudController ¶
type CloudController struct { // this lock makes Write thread safe // Use it only to protect Write calls. sync.Mutex // I like the idea of being non blocking. // If WSS has lost connection - all other services still are working. // If they try to send on bad connection - Write will exit and allow services to continue working // When connection is restored - services will send the newest data they have. // And nobody cares about old data, that was not sent during the time the connection was lost. state.StateMachine // contains filtered or unexported fields }
func (*CloudController) Close ¶
func (cc *CloudController) Close() error
Close closes websocket connection to saas backend
func (*CloudController) Reconnect ¶
func (cc *CloudController) Reconnect() error
Reconnect closes websocket connection to saas backend But does not change state - so this should result in reconnecting from Recv funtion
func (*CloudController) Recv ¶
func (cc *CloudController) Recv() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.