Documentation ¶
Overview ¶
Package realtime implements a simple Real Time server, which will be used for managing external services.
Index ¶
- type RealTime
- func (r *RealTime) AddPresence(ch string, clientID string, info *centrifuge.ClientInfo) error
- func (r *RealTime) HandleConnect(client *centrifuge.Client)
- func (r *RealTime) HandleConnecting(ctx context.Context, e centrifuge.ConnectEvent) (centrifuge.ConnectReply, error)
- func (r *RealTime) Handler(w http.ResponseWriter, req *http.Request)
- func (r *RealTime) Presence(ch string) (map[string]*centrifuge.ClientInfo, error)
- func (r *RealTime) PresenceStats(ch string) (centrifuge.PresenceStats, error)
- func (r *RealTime) RemovePresence(ch string, clientID string, userID string) error
- func (r *RealTime) Run() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RealTime ¶
type RealTime struct { sync.RWMutex Log *log.Entry WSHandler *centrifuge.WebsocketHandler BackendUrl string DB *database.Database // contains filtered or unexported fields }
func (*RealTime) AddPresence ¶
func (r *RealTime) AddPresence(ch string, clientID string, info *centrifuge.ClientInfo) error
func (*RealTime) HandleConnect ¶
func (r *RealTime) HandleConnect(client *centrifuge.Client)
func (*RealTime) HandleConnecting ¶
func (r *RealTime) HandleConnecting(ctx context.Context, e centrifuge.ConnectEvent) (centrifuge.ConnectReply, error)
func (*RealTime) Presence ¶
func (r *RealTime) Presence(ch string) (map[string]*centrifuge.ClientInfo, error)
func (*RealTime) PresenceStats ¶
func (r *RealTime) PresenceStats(ch string) (centrifuge.PresenceStats, error)
func (*RealTime) RemovePresence ¶
Click to show internal directories.
Click to hide internal directories.