Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrWsClosed is the error message when a websocket.(*Conn).Close tries to // close an already closed connection. See Go's src/internal/poll/fd.go. ErrWsClosed = "use of closed network connection" )
View Source
var Subscriptions = map[string]HubSignal{ "newblock": SigNewBlock, "mempool": SigMempoolUpdate, "ping": SigPingAndUserCount, "newtxs": SigNewTxs, "address": SigAddressTx, "blockchainSync": SigSyncStatus, }
Functions ¶
func IsIOTimeoutErr ¶
IsIOTimeoutErr checks if the passed error indicates an I/O timeout error.
func IsTemporaryErr ¶
IsTemporaryErr checks if the passed error indicates a transient error.
func IsWSClosedErr ¶
IsWSClosedErr checks if the passed error indicates a closed websocket connection.
Types ¶
type AddressMessage ¶
func (AddressMessage) String ¶
func (am AddressMessage) String() string
type HubMessage ¶
type HubMessage struct { Signal HubSignal Msg interface{} }
func (HubMessage) IsValid ¶
func (m HubMessage) IsValid() bool
func (HubMessage) String ¶
func (m HubMessage) String() string
type WebSocketMessage ¶
WebSocketMessage represents the JSON object used to send and receive typed messages to the web client.
Click to show internal directories.
Click to hide internal directories.