Documentation
¶
Index ¶
- Constants
- func ReadCommand(ws *websocket.Conn) (byte, error)
- func ReadMessage(ws *websocket.Conn, v interface{}) error
- func WriteCommand(ws *websocket.Conn, cmdType byte) error
- func WriteMessage(ws *websocket.Conn, payload interface{}) error
- type ClientMessage
- type Register
- type RegisterResponse
- type SyncTemplateVars
- type SyncTemplates
Constants ¶
View Source
const ( MSG_NONE = iota MSG_BOOTSTRAP MSG_PING MSG_SYNC_TEMPLATES // Sent to origin server to request all templates MSG_UPDATE_TEMPLATE MSG_DELETE_TEMPLATE MSG_SYNC_USER // Sent to origin server to request a user be synced MSG_UPDATE_USER MSG_DELETE_USER MSG_SYNC_TEMPLATEVARS // Sent to origin server to request all template variables MSG_UPDATE_TEMPLATEVAR MSG_DELETE_TEMPLATEVAR MSG_SYNC_SPACE // Sent to origin server to request a space sync back to the leaf MSG_UPDATE_SPACE MSG_DELETE_SPACE MSG_UPDATE_VOLUME // Sent to origin server to update a volume MSG_MIRROR_TOKEN // Sent to origin to create a token as a mirror to a leaf token MSG_DELETE_TOKEN )
Variables ¶
This section is empty.
Functions ¶
func ReadMessage ¶
func WriteMessage ¶
Types ¶
type ClientMessage ¶
type ClientMessage struct {
Command byte
Payload interface{}
}
message used internally over the leader / follower channels
type RegisterResponse ¶
type RegisterResponse struct {
Success bool
RestrictedNode bool // flags the node is registered as a restricted node
Version string
Location string
}
message sent from the leader to the follower in response to a register message
type SyncTemplateVars ¶
type SyncTemplateVars struct {
Existing []string
}
type SyncTemplates ¶
type SyncTemplates struct {
Existing []string
}
Click to show internal directories.
Click to hide internal directories.