Versions in this module Expand all Collapse all v0 v0.2.1 May 14, 2015 v0.2.0 May 6, 2015 Changes in this version + var CONNECTION_DOWN_RESPONSE = []byte("-ERR Connection down") + var ERR_BAD_ARGUMENTS = []byte("-ERR Wrong number of arguments supplied for this command") + var ERR_COMMAND_UNSUPPORTED = []byte("-ERR This command is not supported") + var MULTIPLEX_OPERATION_UNSUPPORTED_RESPONSE = []byte("-ERR This command is not supported for multiplexing servers") + type Client struct + Active bool + ActiveConnection *connection.Connection + ConnectionReadWriter *protocol.TimedNetReadWriter + DatabaseId int + Subscriptions map[string]bool + func NewClient(connection net.Conn, readTimeout, writeTimeout time.Duration) (newClient *Client) + func (myClient *Client) HandleRequest(connectionPool *connection.ConnectionPool, firstLine []byte) (err error) + func (myClient *Client) ParseCommand(firstLine []byte, isMultiplexing bool) (responded bool, err error) + func (myClient *Client) SendSubscriptionResponse() (err error) + type RedisMultiplexer struct + ClientReadTimeout time.Duration + ClientWriteTimeout time.Duration + ConnectionCluster []*connection.ConnectionPool + EndpointConnectTimeout time.Duration + EndpointReadTimeout time.Duration + EndpointWriteTimeout time.Duration + HashRing *connection.HashRing + Listener net.Listener + PoolSize int + PrimaryConnectionPool *connection.ConnectionPool + SubscriptionCluster map[string]*Subscription + func NewRedisMultiplexer(listenProtocol, listenEndpoint string, poolSize int) (newRedisMultiplexer *RedisMultiplexer, err error) + func (myRedisMultiplexer *RedisMultiplexer) AddConnection(remoteProtocol, remoteEndpoint string) + func (myRedisMultiplexer *RedisMultiplexer) GetSubscription(channelName string) (mySubscription *Subscription) + func (myRedisMultiplexer *RedisMultiplexer) HandleClientRequests(myClient *Client) + func (myRedisMultiplexer *RedisMultiplexer) Start() (err error) + type Subscription struct + ActiveConnection *connection.Connection + ActiveConnectionKey string + RequestStop bool + func NewSubscription(capacity int, channelName string) (newSubscription *Subscription) + func (mySubscription *Subscription) AddClient(newClient *Client) + func (mySubscription *Subscription) BroadcastMessage(broadcastMessage []byte) + func (mySubscription *Subscription) BroadcastMessages() (err error) + func (mySubscription *Subscription) RemoveClient(oldClient *Client) + func (mySubscription *Subscription) UpdateConnection(myConnectionKey string, myConnectionPool *connection.ConnectionPool)