sources

package
v0.0.0-...-4461672 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

Close will release resources

func RedisPing

func RedisPing() error

RedisPing send ping message to redis

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL