This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
2021-01-16 20:41:39 +00:00
|
|
|
package ak
|
2020-09-02 22:04:12 +00:00
|
|
|
|
|
|
|
type websocketInstruction int
|
|
|
|
|
|
|
|
const (
|
|
|
|
// WebsocketInstructionAck Code used to acknowledge a previous message
|
|
|
|
WebsocketInstructionAck websocketInstruction = 0
|
|
|
|
// WebsocketInstructionHello Code used to send a healthcheck keepalive
|
|
|
|
WebsocketInstructionHello websocketInstruction = 1
|
|
|
|
// WebsocketInstructionTriggerUpdate Code received to trigger a config update
|
|
|
|
WebsocketInstructionTriggerUpdate websocketInstruction = 2
|
2023-10-08 23:06:52 +00:00
|
|
|
// WebsocketInstructionProviderSpecific Code received to trigger some provider specific function
|
|
|
|
WebsocketInstructionProviderSpecific websocketInstruction = 3
|
2020-09-02 22:04:12 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type websocketMessage struct {
|
|
|
|
Instruction websocketInstruction `json:"instruction"`
|
|
|
|
Args map[string]interface{} `json:"args"`
|
|
|
|
}
|