Documentation ¶
Index ¶
- Constants
- func GetClientsInChunks(clients map[*Client]bool, nrOfChunks uint16) []map[*Client]bool
- func GetClientsInChunksWithConn(clients map[uint64]*Client, nrOfChunks uint16) []map[uint64]*Client
- func NewClientsInstance() *clientsData
- type BinaryPayload
- type BroadcastHub
- type Client
- func (c *Client) BroadcastBinary(message []byte) *Client
- func (c *Client) BroadcastJSON(message interface{}, onJsonError OnJsonError) *Client
- func (c *Client) BroadcastText(message string) *Client
- func (c *Client) Disconnect() error
- func (c *Client) DisconnectGracefully(code uint16, message string)
- func (c *Client) Get(key string) interface{}
- func (c *Client) GetAuthDetails() *authentication.AuthDetails
- func (c *Client) GetAuthToken() string
- func (c *Client) GetAuthTokenID() string
- func (c *Client) GetCancelContext() *_context.CancelCtx
- func (c *Client) GetConnectTime() time.Time
- func (c *Client) GetConnectedTimeSeconds() int64
- func (c *Client) GetConnectionID() uint64
- func (c *Client) GetDeviceID() string
- func (c *Client) GetDeviceUUID() string
- func (c *Client) GetHttpContext() *gin.Context
- func (c *Client) GetIPAddress() string
- func (c *Client) GetRemoteIP() string
- func (c *Client) GetRequestPath() string
- func (c *Client) GetSafeHttpContext() *gin.Context
- func (c *Client) GetTokenExpirationTime() time.Time
- func (c *Client) GetUserID() string
- func (c *Client) IsDisconnecting() bool
- func (c *Client) LDebug() *zerolog.Event
- func (c *Client) LDebugF(functionName string) *zerolog.Event
- func (c *Client) LError() *zerolog.Event
- func (c *Client) LErrorF(functionName string) *zerolog.Event
- func (c *Client) LEvent(eventType string, eventName string, beforeMsg func(event *zerolog.Event))
- func (c *Client) LFatal() *zerolog.Event
- func (c *Client) LInfo() *zerolog.Event
- func (c *Client) LInfoF(functionName string) *zerolog.Event
- func (c *Client) LPanic() *zerolog.Event
- func (c *Client) LWarn() *zerolog.Event
- func (c *Client) LWarnF(functionName string) *zerolog.Event
- func (c *Client) LiveStreaming() *Client
- func (c *Client) SendBinary(message []byte) *Client
- func (c *Client) SendJSON(message interface{}, onJsonError OnJsonError) *Client
- func (c *Client) SendText(message string) *Client
- func (c *Client) SendTextPayload(textPayload TextPayload) *Client
- func (c *Client) Set(key string, value interface{}) *Client
- func (c *Client) WriteBinary(message []byte) *Client
- func (c *Client) WriteBinaryPayload(binaryPayload BinaryPayload) *Client
- func (c *Client) WriteFile(filePayload FilePayload) *Client
- func (c *Client) WriteJSON(message interface{}, onJsonError OnJsonError) *Client
- func (c *Client) WriteText(message string) *Client
- func (c *Client) WriteTextPayload(textPayload TextPayload) *Client
- type ClientDetails
- type ClientsIndex
- type ClientsStatus
- type FilePayload
- type FindClientsFilter
- type FullStatus
- type Hub
- func (h *Hub) BroadcastBinary(message []byte) *Hub
- func (h *Hub) BroadcastByReceivedMessageType(message *ReceivedMessage) *Hub
- func (h *Hub) BroadcastByReceivedMessageTypeTo(message *ReceivedMessage, to FindClientsFilter) *Hub
- func (h *Hub) BroadcastJSON(message interface{}, onJsonError OnJsonError) *Hub
- func (h *Hub) BroadcastText(message string) *Hub
- func (h *Hub) BroadcastTextTo(message string, to FindClientsFilter) *Hub
- func (h *Hub) GetClients() map[*Client]bool
- func (h *Hub) GetClientsByFilter(filter FindClientsFilter) map[uint64]*Client
- func (h *Hub) GetCreatedTime() time.Time
- func (h *Hub) GetNrOfClients() uint
- func (h *Hub) HasOnClientRegister(name string) bool
- func (h *Hub) HasOnClientUnRegister(name string) bool
- func (h *Hub) NewCancelContext() *Hub
- func (h *Hub) NrOfClients() uint
- func (h *Hub) OnClientRegister(name string, callback HubOnClientRegister) bool
- func (h *Hub) OnClientRegisterRemove(name string)
- func (h *Hub) OnClientUnRegister(name string, callback HubOnClientUnRegister) bool
- func (h *Hub) OnClientUnRegisterRemove(name string)
- func (h *Hub) OnStart(onStart HubOnStart) bool
- func (h *Hub) OnStartBroadcast(onStartBroadCast HubOnStartBroadCast) bool
- func (h *Hub) OnStartGetter(onStartGetter HubOnStartGetter) bool
- func (h *Hub) RegisterClient(client *Client) *Hub
- func (h *Hub) SetContext(ctx context.Context)
- func (h *Hub) SetGetter(getter HubGetter) bool
- func (h *Hub) Start() *Hub
- func (h *Hub) Stop() *Hub
- func (h *Hub) UnRegisterClient(client *Client) *Hub
- type HubGetter
- type HubOnClientRegister
- type HubOnClientUnRegister
- type HubOnStart
- type HubOnStartBroadCast
- type HubOnStartGetter
- type HubStatus
- type HubsStatus
- type NrOfClientsStatus
- type OnBeforeStart
- type OnBeforeStop
- type OnBeforeUpgrade
- type OnClose
- type OnConnect
- type OnEvent
- type OnJsonError
- type OnMessage
- type OnStart
- type OnStarted
- type OnStop
- type OnStopped
- type OnUpgrade
- type ReceivedMessage
- func (r *ReceivedMessage) Binary() []byte
- func (r *ReceivedMessage) IsBinary() bool
- func (r *ReceivedMessage) IsClose() bool
- func (r *ReceivedMessage) IsContinuation() bool
- func (r *ReceivedMessage) IsPing() bool
- func (r *ReceivedMessage) IsPong() bool
- func (r *ReceivedMessage) IsText() bool
- func (r *ReceivedMessage) JSONDecode() (interface{}, error)
- func (r *ReceivedMessage) JSONDecodeTo(to interface{}) error
- func (r *ReceivedMessage) Text() string
- type RegistrationHub
- type Server
- func (s *Server) ClientsStatus(onCollected func(clients ClientsStatus))
- func (s *Server) DisableServerStatus() *Server
- func (s *Server) DisableUnsecure() *Server
- func (s *Server) EnableCompression(status bool)
- func (s *Server) EnableSSL(keyPath string, certPath string) error
- func (s *Server) EnableServerStatus() *Server
- func (s *Server) EnableUnsecure() *Server
- func (s *Server) GetClients() map[*Client]bool
- func (s *Server) GetClientsByFilter(filter FindClientsFilter) map[uint64]*Client
- func (s *Server) GetClientsLogPath() string
- func (s *Server) GetClientsOrderedByConnectionID() map[int64]*Client
- func (s *Server) GetNrOfClients() uint
- func (s *Server) GetWSServer() *gin.Engine
- func (s *Server) IsStarted() bool
- func (s *Server) IsStarting() bool
- func (s *Server) IsStopped() bool
- func (s *Server) IsStopping() bool
- func (s *Server) LDebug() *zerolog.Event
- func (s *Server) LDebugF(functionName string) *zerolog.Event
- func (s *Server) LError() *zerolog.Event
- func (s *Server) LErrorF(functionName string) *zerolog.Event
- func (s *Server) LEvent(eventType string, eventName string, beforeMsg func(event *zerolog.Event))
- func (s *Server) LFatal() *zerolog.Event
- func (s *Server) LInfo() *zerolog.Event
- func (s *Server) LInfoF(functionName string) *zerolog.Event
- func (s *Server) LPanic() *zerolog.Event
- func (s *Server) LWarn() *zerolog.Event
- func (s *Server) LWarnF(functionName string) *zerolog.Event
- func (s *Server) NewCancelContext() *Server
- func (s *Server) NewHub(getter ...HubGetter) *Hub
- func (s *Server) OnBeforeStart(name string, callback OnStart) bool
- func (s *Server) OnBeforeStartRemove(name string)
- func (s *Server) OnBeforeStop(name string, callback OnStop) bool
- func (s *Server) OnBeforeStopRemove(name string)
- func (s *Server) OnBeforeUpgrade(name string, callback OnBeforeUpgrade) bool
- func (s *Server) OnBeforeUpgradeRemove(name string)
- func (s *Server) OnClose(name string, callback OnClose) bool
- func (s *Server) OnCloseRemove(name string)
- func (s *Server) OnConnect(name string, callback OnConnect) bool
- func (s *Server) OnConnectRemove(name string)
- func (s *Server) OnMessage(name string, callback OnMessage) bool
- func (s *Server) OnMessageRemove(name string)
- func (s *Server) OnStart(name string, callback OnStart) bool
- func (s *Server) OnStartRemove(name string)
- func (s *Server) OnStarted(name string, callback OnStart) bool
- func (s *Server) OnStartedRemove(name string)
- func (s *Server) OnStop(name string, callback OnStop) bool
- func (s *Server) OnStopRemove(name string)
- func (s *Server) OnStopped(name string, callback OnStop) bool
- func (s *Server) OnStoppedRemove(name string)
- func (s *Server) ServerStatus(onCollected func(status Status))
- func (s *Server) SetContext(ctx context.Context)
- func (s *Server) SetReadBufferSize(bufferSize uint64)
- func (s *Server) SetStatusCredentials(username string, password string) *Server
- func (s *Server) SetWriteBufferSize(bufferSize uint64)
- func (s *Server) Stack(onCollected func(stack string))
- func (s *Server) Start() error
- func (s *Server) Status(onCollected func(status FullStatus))
- func (s *Server) StatusHubs(onCollected func(status HubsStatus))
- func (s *Server) StatusNrOfClients(onCollected func(status NrOfClientsStatus))
- func (s *Server) StatusSystemStatus(onCollected func(status SystemStatus))
- func (s *Server) Stop() error
- func (s *Server) UpgradeToWS(c *gin.Context, onMessage OnMessage, onUpgrade OnUpgrade) bool
- type Status
- type SystemStatus
- type TextPayload
- type TextPayloadOnResponse
- type TextPayloadStr
Constants ¶
const ( // Time allowed to write a Message to the peer. WriteWait = 10 * time.Second // Time allowed to read the next pong Message from the peer. PongWait = 60 * time.Second // send pings to peer with this period. Must be less than pongWait. PingPeriod = (PongWait * 9) / 10 // Maximum Message size allowed from peer. (By default its 512) MaxMessageSize = 128 * 1024 * 1024 // This is approx 134 MB? // Enable Automatic HTTP Upgrade to WS EnableHttpToWebSocketUpgrade = true )
const DefaultCloseCode = 1000
const DefaultCloseReason = "No specific reason!"
const DefaultEnableCompression = true
const DefaultListeningAddress = "0.0.0.0:8080"
const DefaultReadBufferSize = 1024
const DefaultSSLListeningAddress = "0.0.0.0:8443"
const DefaultWriteBufferSize = 1024
Variables ¶
This section is empty.
Functions ¶
func GetClientsInChunks ¶
the programmer should handle locks before!! func GetClientsInChunks(clients interface{}, nrOfChunks uint16) []map[*Client]bool {
func NewClientsInstance ¶
func NewClientsInstance() *clientsData
Types ¶
type BinaryPayload ¶
type BinaryPayload struct { // This is the unique ID of the payload PayloadID string // This is chunk size based on what the data will be split! ChunkSize int64 OnResponse TextPayloadOnResponse // That's when we receive a response from the client with a specific chunk id! OnChunkResponse func() // This is the data Data []byte }
type BroadcastHub ¶
type BroadcastHub struct {
// contains filtered or unexported fields
}
func NewBroadcastHub ¶
func NewBroadcastHub(s *Server) *BroadcastHub
type Client ¶
type Client struct { // Logger -> it's specifically related to client // Logs will be written to client file, but not in the main websocket log file // If needed, this can be enabled Logger *model.Logger // contains filtered or unexported fields }
func (*Client) BroadcastBinary ¶
BroadcastBinary -> It sends clear bytes to the c
func (*Client) BroadcastJSON ¶
func (c *Client) BroadcastJSON(message interface{}, onJsonError OnJsonError) *Client
BroadcastJSON - It sends Any structure to the c encoded as JSON!
func (*Client) BroadcastText ¶
BroadcastText - It sends clear Text to the c! without any encoding!
func (*Client) DisconnectGracefully ¶
DisconnectGracefully -> set 0 and "" for default values!
func (*Client) GetAuthDetails ¶
func (c *Client) GetAuthDetails() *authentication.AuthDetails
func (*Client) GetAuthToken ¶
func (*Client) GetAuthTokenID ¶
func (*Client) GetCancelContext ¶
func (*Client) GetConnectTime ¶
func (*Client) GetConnectedTimeSeconds ¶
func (*Client) GetConnectionID ¶
func (*Client) GetDeviceID ¶
func (*Client) GetDeviceUUID ¶
func (*Client) GetHttpContext ¶
func (*Client) GetIPAddress ¶
func (*Client) GetRemoteIP ¶
func (*Client) GetRequestPath ¶
func (*Client) GetSafeHttpContext ¶
func (*Client) GetTokenExpirationTime ¶
func (*Client) IsDisconnecting ¶
func (*Client) LErrorF ¶
LErrorF -> when you need specifically to indicate in what function the logging is happening
func (*Client) LInfoF ¶
LInfoF -> when you need specifically to indicate in what function the logging is happening
func (*Client) LWarnF ¶
LWarnF -> when you need specifically to indicate in what function the logging is happening
func (*Client) LiveStreaming ¶
func (*Client) SendBinary ¶
func (*Client) SendJSON ¶
func (c *Client) SendJSON(message interface{}, onJsonError OnJsonError) *Client
func (*Client) SendTextPayload ¶
func (c *Client) SendTextPayload(textPayload TextPayload) *Client
func (*Client) WriteBinary ¶
WriteBinary - It sends clear bytes to the client
func (*Client) WriteBinaryPayload ¶
func (c *Client) WriteBinaryPayload(binaryPayload BinaryPayload) *Client
WriteBinaryPayload - This can be large files, audio data, anything... this is multiparted!
func (*Client) WriteFile ¶
func (c *Client) WriteFile(filePayload FilePayload) *Client
func (*Client) WriteJSON ¶
func (c *Client) WriteJSON(message interface{}, onJsonError OnJsonError) *Client
WriteJSON - It sends Any structure to the client encoded as JSON!
func (*Client) WriteTextPayload ¶
func (c *Client) WriteTextPayload(textPayload TextPayload) *Client
WriteTextPayload - We will write any type of Message which will be formatted into a JSON and into a specific structure! This also will receive a response from the client! It's also limited to a specific packet length! It's destined to receive back a response from the Client!
type ClientDetails ¶
type ClientsIndex ¶
type ClientsIndex struct { // Indexes Users map[string]map[uint64]*Client Devices map[string]map[uint64]*Client Connections map[uint64]*Client AuthTokens map[string]map[uint64]*Client IPAddresses map[string]map[uint64]*Client RequestPath map[string]map[uint64]*Client // contains filtered or unexported fields }
Here we store reverse map of the connections!
type ClientsStatus ¶
type ClientsStatus struct { NrOfClients int64 Clients map[int64]ClientDetails }
type FilePayload ¶
type FindClientsFilter ¶
type FindClientsFilter struct { All bool // Users (ID's) Users []string // Devices (ID's) Devices []string // AuthTokens (Tokens) AuthTokens []string // Connections (ID's) Connections []uint64 // IP Addresses (Addresses) IPAddresses []string // Route Paths RequestPaths []string // Exception List (usually used in tandem with All param) if sending to everyone ExceptConnections []uint64 ExceptUsers []string ExceptDevices []string ExceptAuthTokens []string ExceptIPAddresses []string ExceptRequestPaths []string // contains filtered or unexported fields }
type FullStatus ¶
type FullStatus struct { Name string ListeningAddresses []string ListeningAddressesSSL []string CurrentConnectionID uint64 NrOfClients uint Hubs []HubStatus SystemStatus info.SystemStatus }
func (*FullStatus) Collect ¶
func (s *FullStatus) Collect()
type Hub ¶
type Hub struct { // If the stop has being called! StopCalled *_bool.Bool // ControlMessages ControlChannel chan int // Unregistered ClientsStatus UnregisterClientChannel chan *Client // contains filtered or unexported fields }
func (*Hub) BroadcastBinary ¶
func (*Hub) BroadcastByReceivedMessageType ¶
func (h *Hub) BroadcastByReceivedMessageType(message *ReceivedMessage) *Hub
func (*Hub) BroadcastByReceivedMessageTypeTo ¶
func (h *Hub) BroadcastByReceivedMessageTypeTo(message *ReceivedMessage, to FindClientsFilter) *Hub
func (*Hub) BroadcastJSON ¶
func (h *Hub) BroadcastJSON(message interface{}, onJsonError OnJsonError) *Hub
func (*Hub) BroadcastText ¶
func (*Hub) BroadcastTextTo ¶
func (h *Hub) BroadcastTextTo(message string, to FindClientsFilter) *Hub
func (*Hub) GetClients ¶
func (*Hub) GetClientsByFilter ¶
func (h *Hub) GetClientsByFilter(filter FindClientsFilter) map[uint64]*Client
func (*Hub) GetCreatedTime ¶
func (*Hub) GetNrOfClients ¶
func (*Hub) HasOnClientRegister ¶
func (*Hub) HasOnClientUnRegister ¶
func (*Hub) NewCancelContext ¶
func (*Hub) NrOfClients ¶
func (*Hub) OnClientRegister ¶
func (h *Hub) OnClientRegister(name string, callback HubOnClientRegister) bool
func (*Hub) OnClientRegisterRemove ¶
func (*Hub) OnClientUnRegister ¶
func (h *Hub) OnClientUnRegister(name string, callback HubOnClientUnRegister) bool
func (*Hub) OnClientUnRegisterRemove ¶
func (*Hub) OnStart ¶
func (h *Hub) OnStart(onStart HubOnStart) bool
func (*Hub) OnStartBroadcast ¶
func (h *Hub) OnStartBroadcast(onStartBroadCast HubOnStartBroadCast) bool
func (*Hub) OnStartGetter ¶
func (h *Hub) OnStartGetter(onStartGetter HubOnStartGetter) bool
func (*Hub) RegisterClient ¶
RegisterClient -> Adds the client to the hub!
func (*Hub) SetContext ¶
func (*Hub) SetGetter ¶
SetGetter -> This is the function which gets the info and sends to the broadcaster!
func (*Hub) Start ¶
Start -> You can start the Hub before the websocket server has being started! This is the function which starts the hub!
func (*Hub) UnRegisterClient ¶
UnRegisterClient -> Removes the client from the Hub
type HubOnClientRegister ¶
type HubOnClientUnRegister ¶
type HubOnStart ¶
type HubOnStart func(h *Hub)
type HubOnStartBroadCast ¶
type HubOnStartBroadCast func(h *Hub)
type HubOnStartGetter ¶
type HubOnStartGetter func(h *Hub)
type HubsStatus ¶
type HubsStatus struct {
Hubs []HubStatus
}
type NrOfClientsStatus ¶
type OnBeforeStart ¶
type OnBeforeStart func(s *Server)
type OnBeforeStop ¶
type OnBeforeStop func(s *Server)
type OnBeforeUpgrade ¶
type OnBeforeUpgrade func(s *Server)
type OnJsonError ¶
type OnJsonError func(err error, message interface{})
type OnMessage ¶
type OnMessage func(message *ReceivedMessage, c *Client, s *Server)
type ReceivedMessage ¶
type ReceivedMessage struct { // There are few types... MessageType int8 // Bytes?!! MessageLength uint Message []byte }
func (*ReceivedMessage) IsBinary ¶
func (r *ReceivedMessage) IsBinary() bool
func (*ReceivedMessage) IsClose ¶
func (r *ReceivedMessage) IsClose() bool
func (*ReceivedMessage) IsContinuation ¶
func (r *ReceivedMessage) IsContinuation() bool
func (*ReceivedMessage) IsPing ¶
func (r *ReceivedMessage) IsPing() bool
func (*ReceivedMessage) IsPong ¶
func (r *ReceivedMessage) IsPong() bool
func (*ReceivedMessage) IsText ¶
func (r *ReceivedMessage) IsText() bool
func (*ReceivedMessage) JSONDecode ¶
func (r *ReceivedMessage) JSONDecode() (interface{}, error)
It decodes JSON into a Structure!
func (*ReceivedMessage) JSONDecodeTo ¶
func (r *ReceivedMessage) JSONDecodeTo(to interface{}) error
type RegistrationHub ¶
type RegistrationHub struct {
// contains filtered or unexported fields
}
func NewRegistrationHub ¶
func NewRegistrationHub(s *Server) *RegistrationHub
type Server ¶
type Server struct { Name string Description string // This will be the main folder where we will store the logs LoggerDirPath string // This is the logger configuration! Logger *model.Logger // It also includes port ListeningAddresses []string // This is for unencrypted ListeningAddressesSSL []string // This is for encrypted // This is GIN Server WSServer *gin.Engine // This is the registrationHub that registers the c... WSRegistrationHub *RegistrationHub // This is the registrationHub which sends broadcast messages! WSBroadcastHub *BroadcastHub // This is the upgrader which transfers from http to WebSocket WSUpgrader websocket.Upgrader // It enables automatic upgrade from http to ws // Usually the server will be behind a proxy server, so it's not necessary.... EnableHttpToWSUpgrade *_bool.Bool // ------Settings ---------\\ // Time allowed to write a Message to the peser. //WriteWait time.Duration WriteWait *duration.Duration // Time allowed to read the next pong Message from the peer. PongWait *duration.Duration // send pings to peer with this period. Must be less than pongWait. PingPeriod *duration.Duration // Maximum Message size allowed from peer. MaxMessageSize *_uint64.Uint64 // Here we store the created Hubs // The Hubs are being added here when they are started only! // There is no reference until they are started! Hubs map[*Hub]bool // contains filtered or unexported fields }
func (*Server) ClientsStatus ¶
func (s *Server) ClientsStatus(onCollected func(clients ClientsStatus))
func (*Server) DisableServerStatus ¶
func (*Server) DisableUnsecure ¶
func (*Server) EnableCompression ¶
func (*Server) EnableServerStatus ¶
func (*Server) EnableUnsecure ¶
func (*Server) GetClients ¶
func (*Server) GetClientsByFilter ¶
func (s *Server) GetClientsByFilter(filter FindClientsFilter) map[uint64]*Client
func (*Server) GetClientsLogPath ¶
GetClientsLogPath -> returns the path where the logs for clients are stored
func (*Server) GetClientsOrderedByConnectionID ¶
func (*Server) GetNrOfClients ¶
func (*Server) GetWSServer ¶
func (*Server) IsStarting ¶
func (*Server) IsStopping ¶
func (*Server) LDebugF ¶
LDebugF -> when you need specifically to indicate in what function the logging is happening
func (*Server) LErrorF ¶
LErrorF -> when you need specifically to indicate in what function the logging is happening
func (*Server) LInfoF ¶
LInfoF -> when you need specifically to indicate in what function the logging is happening
func (*Server) LWarnF ¶
LWarnF -> when you need specifically to indicate in what function the logging is happening
func (*Server) NewCancelContext ¶
func (*Server) NewHub ¶
NewHub -> It creates a special custom hub with specific functionality for handling c
func (*Server) OnBeforeStartRemove ¶
func (*Server) OnBeforeStopRemove ¶
func (*Server) OnBeforeUpgrade ¶
func (s *Server) OnBeforeUpgrade(name string, callback OnBeforeUpgrade) bool
func (*Server) OnBeforeUpgradeRemove ¶
func (*Server) OnCloseRemove ¶
func (*Server) OnConnectRemove ¶
func (*Server) OnMessageRemove ¶
func (*Server) OnStartRemove ¶
func (*Server) OnStartedRemove ¶
func (*Server) OnStopRemove ¶
func (*Server) OnStoppedRemove ¶
func (*Server) ServerStatus ¶
func (*Server) SetContext ¶
func (*Server) SetReadBufferSize ¶
func (*Server) SetStatusCredentials ¶
func (*Server) SetWriteBufferSize ¶
func (*Server) Status ¶
func (s *Server) Status(onCollected func(status FullStatus))
func (*Server) StatusHubs ¶
func (s *Server) StatusHubs(onCollected func(status HubsStatus))
func (*Server) StatusNrOfClients ¶
func (s *Server) StatusNrOfClients(onCollected func(status NrOfClientsStatus))
func (*Server) StatusSystemStatus ¶
func (s *Server) StatusSystemStatus(onCollected func(status SystemStatus))
type SystemStatus ¶
type SystemStatus struct {
SystemStatus info.SystemStatus
}
type TextPayload ¶
type TextPayload struct { // This is the data which should be sent! Message interface{} // This when the payload has being sent successfully OnFinish TextPayloadOnResponse // On response of a specific part OnPartResponse func() // On json error OnJsonError OnJsonError // This is the size of the packet... the message will be split into parts ChunkSize int64 }
type TextPayloadOnResponse ¶
type TextPayloadOnResponse func(response ReceivedMessage)
type TextPayloadStr ¶
Source Files ¶
- hub_broadcast.go
- hub_constructor.go
- hub_context.go
- hub_controller.go
- hub_events.go
- hub_functions.go
- hub_getter.go
- hub_message_send.go
- hub_start.go
- hub_status.go
- hub_stop.go
- hub_structure.go
- server_broadcast_hub.go
- server_callbacks.go
- server_client.go
- server_client_buffer.go
- server_client_context.go
- server_client_indexing.go
- server_client_logger.go
- server_client_model.go
- server_client_reader.go
- server_client_send_message.go
- server_client_writer.go
- server_compression.go
- server_constructor.go
- server_context.go
- server_defaults.go
- server_functions.go
- server_logging.go
- server_message_receive.go
- server_model.go
- server_registration_hub.go
- server_ssl.go
- server_start.go
- server_status.go
- server_stop.go
- server_upgrader.go