Documentation ¶
Index ¶
Constants ¶
View Source
const ( MsgNewSale = "new_event" MsgGasPrice = "gas_price" MsgRecentOwnEvents = "recent_own_events" MsgCommand = "cmd" )
Variables ¶
View Source
var (
ErrEventNotSupported = errors.New("this event type is not supported")
)
* wsUpgrader is used to upgrade incomming HTTP requests into a persitent websocket connection.
Functions ¶
This section is empty.
Types ¶
type EventPayload ¶ added in v0.10.0
type EventPayload struct {
Message string `json:"message"`
}
payloads for message types.
type Message ¶ added in v0.5.0
type Message struct { // Type is the message type sent Type string `json:"type"` // Payload is the data Based on the Type Payload *json.RawMessage `json:"payload"` }
Message is the Messages sent over the websocket Used to differ between different actions.
type MessageGeneric ¶ added in v0.10.0
type MessageHandler ¶ added in v0.5.0
MessageHandler is a function signature that is used to affect messages on the socket and triggered depending on the type.
type WsClient ¶ added in v0.4.0
type WsClient struct {
// contains filtered or unexported fields
}
type WsHub ¶ added in v0.4.0
func (*WsHub) ClientsOnline ¶ added in v0.11.0
ClientsOnline returns the number of clients that are currently connected.
Click to show internal directories.
Click to hide internal directories.