Documentation ¶
Overview ¶
Package controlchannel implement control communicator for web socket connection.
Index ¶
- type ControlChannel
- func (controlChannel *ControlChannel) Close(log log.T) error
- func (controlChannel *ControlChannel) Initialize(context context.T, mgsService service.Service, instanceId string, ...)
- func (controlChannel *ControlChannel) Open(context context.T, ableToOpenMGSConnection *uint32) error
- func (controlChannel *ControlChannel) Reconnect(context context.T, ableToOpenMGSConnection *uint32) error
- func (controlChannel *ControlChannel) SendMessage(log log.T, input []byte, inputType int) error
- func (controlChannel *ControlChannel) SetWebSocket(context context.T, mgsService service.Service, ableToOpenMGSConnection *uint32) error
- type IControlChannel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlChannel ¶
type ControlChannel struct { ChannelId string Service service.Service AuditLogScheduler telemetry.IAuditLogTelemetry // contains filtered or unexported fields }
ControlChannel used for communication between the message gateway service and the agent.
func (*ControlChannel) Close ¶
func (controlChannel *ControlChannel) Close(log log.T) error
Close closes controlchannel - its web socket connection.
func (*ControlChannel) Initialize ¶
func (controlChannel *ControlChannel) Initialize(context context.T, mgsService service.Service, instanceId string, agentMessageIncomingMessageChan chan mgsContracts.AgentMessage)
Initialize populates controlchannel object and opens controlchannel to communicate with mgs.
func (*ControlChannel) Open ¶
func (controlChannel *ControlChannel) Open(context context.T, ableToOpenMGSConnection *uint32) error
Open opens a websocket connection and sends the token for service to acknowledge the connection.
func (*ControlChannel) Reconnect ¶
func (controlChannel *ControlChannel) Reconnect(context context.T, ableToOpenMGSConnection *uint32) error
Reconnect reconnects a controlchannel.
func (*ControlChannel) SendMessage ¶
SendMessage sends a message to the service through control channel.
func (*ControlChannel) SetWebSocket ¶
func (controlChannel *ControlChannel) SetWebSocket(context context.T, mgsService service.Service, ableToOpenMGSConnection *uint32) error
SetWebSocket populates webchannel object.
type IControlChannel ¶
type IControlChannel interface { Initialize(context context.T, mgsService service.Service, instanceId string, agentMessageIncomingMessageChan chan mgsContracts.AgentMessage) SetWebSocket(context context.T, mgsService service.Service, ableToOpenMGSConnection *uint32) error SendMessage(log log.T, input []byte, inputType int) error Reconnect(context context.T, ableToOpenMGSConnection *uint32) error Close(log log.T) error Open(context context.T, ableToOpenMGSConnection *uint32) error }
Click to show internal directories.
Click to hide internal directories.