saas

package
v0.6.3-beta01 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 16 Imported by: 0

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)

func (*CloudController) Write

func (cc *CloudController) Write(b []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL