# Functions
ClientCommandsFromJSON extracts slice of ClientCommand from client request encoded as JSON.
EncodeJSONString escapes string value when encoding it to JSON.
NewAdminConnectResponse initializes AdminConnectResponse.
NewAdminInfoResponse initializes AdminInfoResponse.
NewAdminMessage initializes new AdminMessage.
NewAdminMessageResponse initializes AdminMessageResponse.
NewAdminPingResponse initializes AdminPingResponse.
NewAPIBroadcastResponse initializes APIBroadcastResponse.
NewAPIChannelsResponse initializes APIChannelsResponse.
NewAPIDisconnectResponse initializes APIDisconnectResponse.
NewAPIHistoryResponse initializes APIHistoryResponse.
NewAPINodeResponse initializes APINodeResponse.
NewAPIPresenceResponse initializes APIPresenceResponse.
NewAPIPublishResponse initializes APIPublishResponse.
NewAPIStatsResponse initializes APIStatsResponse.
NewAPIUnsubscribeResponse initializes APIUnsubscribeResponse.
NewClientConnectResponse initializes ClientConnectResponse.
NewClientHistoryResponse initializes ClientHistoryResponse.
NewClientInfo allows to initialize ClientInfo.
NewClientJoinMessage initializes ClientJoinResponse.
NewClientLeaveMessage initializes ClientLeaveResponse.
NewClientMessage returns initialized client message response.
NewClientPingResponse initializes ClientPingResponse.
NewClientPresenceResponse initializes ClientPresenceResponse.
NewClientPublishResponse initializes ClientPublishResponse.
NewClientRefreshResponse initializes ClientRefreshResponse.
NewClientSubscribeResponse initializes ClientSubscribeResponse.
NewClientUnsubscribeResponse initializes ClientUnsubscribeResponse.
NewControlMessage initializes new ControlMessage.
NewJoinMessage initializes new JoinMessage.
NewLeaveMessage initializes new LeaveMessage.
NewMessage initializes new Message.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
ErrorAdviceFix says that developer most probably made a mistake working with Centrifugo.
ErrorAdviceNone represents undefined advice.
ErrorAdviceRetry says that operation can't be done at moment but may be possible in future.
# Variables
ErrAlreadySubscribed returned when client wants to subscribe on channel it already subscribed to.
ErrClientClosed means that client connection already closed.
ErrInternalServerError means server error, if returned this is a signal that something went wrong with Centrifugo itself.
No description provided by the author
No description provided by the author
ErrInvalidMessage means that you sent invalid message to Centrifugo.
ErrInvalidToken means that client sent invalid token.
ErrLimitExceeded says that some sort of limit exceeded, server logs should give more detailed information.
ErrMethodNotFound means that method sent in command does not exist.
ErrNamespaceNotFound means that namespace in channel name does not exist.
ErrNotAvailable means that resource is not enabled.
ErrPermissionDenied means that access to resource not allowed.
ErrSendTimeout means that timeout occurred when sending message into connection.
ErrUnauthorized means unauthorized access.
# Structs
AdminConnectResponse represents response to admin connect command.
AdminInfoBody represents response to admin info command.
AdminInfoResponse represents response to admin info command.
No description provided by the author
AdminMessageResponse is a new message for admin that watches.
AdminPingResponse represents response to admin ping command.
APIBroadcastResponse represents response to broadcast API command.
APIChannelsResponse represents response to API channels command.
APICommand describes API request command struct.
APIDisconnectResponse represents response to API disconnect command.
APIHistoryResponse represents response to API history command.
APINodeResponse represents response to API node command.
APIPresenceResponse represents response to API presence command.
APIPublishResponse represents response to API publish command.
APIStatsResponse represents response to API stats command.
APIUnsubscribeResponse represents response to API unsubscribe command.
BroadcastAPICommand is used to publish messages into multiple channels.
ChannelsBody represents body of response in case of successful channels command.
ClientCommand describes client connection command struct.
ClientConnectResponse represents response to client connect command.
ClientHistoryResponse represents response to client history command.
No description provided by the author
ClientJoinResponse sent to client when someone subscribed on channel.
ClientLeaveResponse sent when someone unsubscribes from channel.
ClientMessageResponse can not have an error.
ClientPingResponse represents response to client ping command.
ClientPresenceResponse represents response to client presence command.
ClientPublishResponse represents response to ClientPublishResponse.
ClientRefreshResponse represents response to client refresh command.
ClientSubscribeResponse represents response to client subscribe command.
ClientUnsubscribeResponse represents response to client unsubscribe command.
ConnectAdminCommand required to authorize admin connection and provide connection options.
ConnectBody represents body of response in case of successful connect command.
ConnectClientCommand is a command to authorize connection - it contains user ID in web application, additional connection information as JSON string, timestamp with unix seconds on moment when connect parameters generated and HMAC token to prove correctness of all those parameters.
No description provided by the author
DisconnectAPICommand is used to disconnect user.
DisconnectControlCommand required to disconnect user from all nodes.
HistoryAPICommand is used to get history information for channel.
HistoryBody represents body of response in case of successful history command.
HistoryClientCommand is used to get history information for channel.
No description provided by the author
No description provided by the author
No description provided by the author
NodeBody represents body of response in case of successful node command.
NodeInfo contains information and statistics about Centrifugo node.
PingAdminCommand is used to ping server.
PingBody represents body of response in case of successful ping command.
PingClientCommand is used to ping server.
PingControlCommand allows nodes to know about each other - node sends this control command periodically.
PresenceAPICommand is used to get presence (actual channel subscriptions) information for channel.
PresenceBody represents body of response in case of successful presence command.
PresenceClientCommand is used to get presence (actual channel subscriptions).
PublishAPICommand is used to publish messages into channel.
PublishBody represents body of response in case of successful publish command.
PublishClientCommand is used to publish messages into channel.
RefreshClientCommand is used to prolong connection lifetime when connection check mechanism is enabled.
ResponseError represents error in response.
ServerStats contains state and metrics information from running Centrifugo nodes.
StatsBody represents body of response in case of successful stats command.
SubscribeBody represents body of response in case of successful subscribe command.
SubscribeClientCommand is used to subscribe on channel.
UnsubscribeAPICommand is used to unsubscribe user from channel.
UnsubscribeBody represents body of response in case of successful unsubscribe command.
UnsubscribeClientCommand is used to unsubscribe from channel.
UnsubscribeControlCommand required when node received unsubscribe API command – node unsubscribes user from channel and then send this control command so other nodes could unsubscribe user too.
# Interfaces
Response is an interface describing response methods.
# Type aliases
ErrorAdvice is a string which is sent in case of error.
MultiAPIResponse is a slice of API responses returned as a result for slice of commands received by API in execution order - from first executed to last one.
MultiClientResponse is a slice of responses in execution order - from first executed to last one.