Documentation ¶
Index ¶
Constants ¶
View Source
const ( // InsertOperation is the insert value InsertOperation = "insert" // DeleteOperation is the delete value DeleteOperation = "delete" // StatusOperation is the status value StatusOperation = "status" )
View Source
const ( // RetryCount is count of retrying to connecting to global manager RetryCount = 5 // RetryConnectIntervalSeconds is interval time of retrying to connecting to global manager RetryConnectIntervalSeconds = 5 // MessageChannelCacheSize is size of channel cache MessageChannelCacheSize = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientI ¶
type ClientI interface { Start() error WriteMessage(messageBody interface{}, messageHeader MessageHeader) error Subscribe(m MessageResourceHandler) error }
func NewWebSocketClient ¶
func NewWebSocketClient(options *options.LocalControllerOptions) ClientI
NewWebSocketClient creates client
type Message ¶
type Message struct { Header MessageHeader `json:"header"` Content []byte `json:"content"` }
Message defines message
type MessageHeader ¶
type MessageHeader struct { Namespace string `json:"namespace"` ResourceKind string `json:"resourceKind"` ResourceName string `json:"resourceName"` Operation string `json:"operation"` }
MessageHeader define header of message
type MessageResourceHandler ¶
Click to show internal directories.
Click to hide internal directories.