Documentation ¶
Index ¶
- type AgentComponent
- func (a *AgentComponent) KickClient(ctx context.Context, req *agent.Request) (*agent.Response, error)
- func (a *AgentComponent) KickRemote(clientId, hostAddr string) error
- func (a *AgentComponent) PubMsg(ctx context.Context, req *agent.Request) (*agent.Response, error)
- func (a *AgentComponent) PubMsgRemote(clientId string, content []byte, hostAddr string) error
- func (a *AgentComponent) Start()
- type Auth
- type Plugin
- type SessionComponent
- type TopicComponent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentComponent ¶
type AgentComponent struct {
// contains filtered or unexported fields
}
func NewAgentComponent ¶
func NewAgentComponent(p int, ctx core.ServerContext) *AgentComponent
func (*AgentComponent) KickClient ¶
func (*AgentComponent) KickRemote ¶
func (a *AgentComponent) KickRemote(clientId, hostAddr string) error
func (*AgentComponent) PubMsgRemote ¶
func (a *AgentComponent) PubMsgRemote(clientId string, content []byte, hostAddr string) error
func (*AgentComponent) Start ¶
func (a *AgentComponent) Start()
type SessionComponent ¶
type SessionComponent struct {
// contains filtered or unexported fields
}
func NewSessionComponent ¶
func NewSessionComponent(addr string, redisPool *redis.Pool) *SessionComponent
func (*SessionComponent) DelSession ¶
func (s *SessionComponent) DelSession(clientId string) error
func (*SessionComponent) GetSession ¶
func (s *SessionComponent) GetSession(clientId string) (res string, err error)
func (*SessionComponent) RetrieveSubscribers ¶
func (t *SessionComponent) RetrieveSubscribers(topic string) ([]string, error)
func (*SessionComponent) SaveSession ¶
func (s *SessionComponent) SaveSession(clientId string) error
type TopicComponent ¶
type TopicComponent struct {
// contains filtered or unexported fields
}
func NewTopicComponent ¶
func NewTopicComponent(addr string, redisPool *redis.Pool) *TopicComponent
func (*TopicComponent) RetrieveSubscribers ¶
func (t *TopicComponent) RetrieveSubscribers(topic string) ([]string, error)
func (*TopicComponent) SubTopic ¶
func (t *TopicComponent) SubTopic(topic, clientId string) error
Click to show internal directories.
Click to hide internal directories.