Documentation ¶
Index ¶
- Variables
- type Handler
- func (h *Handler) OnClientConnecting(ctx context.Context, e centrifuge.ConnectEvent, ...) (centrifuge.ConnectReply, error)
- func (h *Handler) OnHistory(c *centrifuge.Client, e centrifuge.HistoryEvent) (centrifuge.HistoryReply, error)
- func (h *Handler) OnPresence(c *centrifuge.Client, e centrifuge.PresenceEvent) (centrifuge.PresenceReply, error)
- func (h *Handler) OnPresenceStats(c *centrifuge.Client, e centrifuge.PresenceStatsEvent) (centrifuge.PresenceStatsReply, error)
- func (h *Handler) OnPublish(c *centrifuge.Client, e centrifuge.PublishEvent, ...) (centrifuge.PublishReply, error)
- func (h *Handler) OnRPC(c *centrifuge.Client, e centrifuge.RPCEvent, ...) (centrifuge.RPCReply, error)
- func (h *Handler) OnRefresh(c *centrifuge.Client, e centrifuge.RefreshEvent, ...) (centrifuge.RefreshReply, RefreshExtra, error)
- func (h *Handler) OnSubRefresh(c *centrifuge.Client, e centrifuge.SubRefreshEvent) (centrifuge.SubRefreshReply, SubRefreshExtra, error)
- func (h *Handler) OnSubscribe(c *centrifuge.Client, e centrifuge.SubscribeEvent, ...) (centrifuge.SubscribeReply, SubscribeExtra, error)
- func (h *Handler) SetRPCExtension(method string, handler RPCExtensionFunc)
- func (h *Handler) Setup() error
- type ProxyMap
- type RPCExtensionFunc
- type RefreshExtra
- type SubRefreshExtra
- type SubscribeExtra
Constants ¶
This section is empty.
Variables ¶
var SkipUserCheckInSubscriptionToken bool
SkipUserCheckInSubscriptionToken enables mode when user id check is skipped while validating Subscription tokens. This flag exists for those who use Centrifugo v3 and want to migrate on Centrifugo v4. Eventually this flag should be removed – all tokens must be issued for users who initiate connection.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler ...
func NewHandler ¶
func NewHandler( node *centrifuge.Node, ruleContainer *rule.Container, tokenVerifier jwtverify.Verifier, proxyMap *ProxyMap, granularProxyMode bool, ) *Handler
NewHandler ...
func (*Handler) OnClientConnecting ¶
func (h *Handler) OnClientConnecting( ctx context.Context, e centrifuge.ConnectEvent, connectProxyHandler proxy.ConnectingHandlerFunc, refreshProxyEnabled bool, ) (centrifuge.ConnectReply, error)
OnClientConnecting ...
func (*Handler) OnHistory ¶
func (h *Handler) OnHistory(c *centrifuge.Client, e centrifuge.HistoryEvent) (centrifuge.HistoryReply, error)
OnHistory ...
func (*Handler) OnPresence ¶
func (h *Handler) OnPresence(c *centrifuge.Client, e centrifuge.PresenceEvent) (centrifuge.PresenceReply, error)
OnPresence ...
func (*Handler) OnPresenceStats ¶
func (h *Handler) OnPresenceStats(c *centrifuge.Client, e centrifuge.PresenceStatsEvent) (centrifuge.PresenceStatsReply, error)
OnPresenceStats ...
func (*Handler) OnPublish ¶
func (h *Handler) OnPublish(c *centrifuge.Client, e centrifuge.PublishEvent, publishProxyHandler proxy.PublishHandlerFunc, d proxy.PerCallData) (centrifuge.PublishReply, error)
OnPublish ...
func (*Handler) OnRPC ¶
func (h *Handler) OnRPC(c *centrifuge.Client, e centrifuge.RPCEvent, rpcProxyHandler proxy.RPCHandlerFunc, d proxy.PerCallData) (centrifuge.RPCReply, error)
OnRPC ...
func (*Handler) OnRefresh ¶
func (h *Handler) OnRefresh(c *centrifuge.Client, e centrifuge.RefreshEvent, refreshProxyHandler proxy.RefreshHandlerFunc, d proxy.PerCallData) (centrifuge.RefreshReply, RefreshExtra, error)
OnRefresh ...
func (*Handler) OnSubRefresh ¶
func (h *Handler) OnSubRefresh(c *centrifuge.Client, e centrifuge.SubRefreshEvent) (centrifuge.SubRefreshReply, SubRefreshExtra, error)
OnSubRefresh ...
func (*Handler) OnSubscribe ¶
func (h *Handler) OnSubscribe(c *centrifuge.Client, e centrifuge.SubscribeEvent, subscribeProxyHandler proxy.SubscribeHandlerFunc, d proxy.PerCallData) (centrifuge.SubscribeReply, SubscribeExtra, error)
OnSubscribe ...
func (*Handler) SetRPCExtension ¶
func (h *Handler) SetRPCExtension(method string, handler RPCExtensionFunc)
SetRPCExtension ...
type ProxyMap ¶
type ProxyMap struct { ConnectProxy proxy.ConnectProxy RefreshProxy proxy.RefreshProxy RpcProxies map[string]proxy.RPCProxy PublishProxies map[string]proxy.PublishProxy SubscribeProxies map[string]proxy.SubscribeProxy }
ProxyMap is a structure which contains all configured and already initialized proxies which can be used from inside client event handlers.
type RPCExtensionFunc ¶
type RPCExtensionFunc func(c *centrifuge.Client, e centrifuge.RPCEvent) (centrifuge.RPCReply, error)
RPCExtensionFunc ...
type RefreshExtra ¶
type RefreshExtra struct {
Meta json.RawMessage
}
type SubRefreshExtra ¶
type SubRefreshExtra struct { }
type SubscribeExtra ¶
type SubscribeExtra struct { }