Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunRabbit ¶
func RunRabbit(manager *sockets.ClientManager, routeKey string)
RunRabbit will call in goroutines exchangeName | routingKey
func RunRedis ¶
func RunRedis(manager *sockets.ClientManager, channelName string)
RunRedis will called in goroutines
Types ¶
type RabbitSource ¶
type RabbitSource struct {
// contains filtered or unexported fields
}
RabbitSource 从 RabbitMQ 读取数据、写入 Socket Client 的 message channel 因为这里只有 连接是要被复用的 & 所以只需要保持连接的对象即可
func RabbitInstance ¶
func RabbitInstance() *RabbitSource
RabbitInstance returns the singleton instance of RabbitMQ
type RedisSource ¶
type RedisSource struct {
// contains filtered or unexported fields
}
RedisSource connected to redis & sub the messages
func RedisInstance ¶
func RedisInstance() *RedisSource
RedisInstance returns the singleton instance of Redis
type Source ¶
type Source interface {
WriteToManager(m *sockets.ClientManager)
}
Source defines the interface of datasource
Click to show internal directories.
Click to hide internal directories.