rsqs

package
v0.0.0-...-4e80ce2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.Mutex

	ID int
	// contains filtered or unexported fields
}

Client is the thread that connect to the remote redis server

func NewClient

func NewClient(srv *Server) *Client

NewClient creates a new client that connect to a Redis server

func (*Client) Exit

func (clt *Client) Exit()

Exit finish the go routine of the client

func (*Client) Reload

func (clt *Client) Reload() error

Reload finish the listener and run it again

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Server is the thread that listen for clients' connections

func New

func New(c lib.RelayerConfig, done chan bool) (*Server, error)

New creates a new Redis local server

func (*Server) Exit

func (srv *Server) Exit()

Exit closes the listener and send done to main

func (*Server) Reload

func (srv *Server) Reload(c *lib.RelayerConfig) (err error)

Reload the configuration

func (*Server) Start

func (srv *Server) Start() (e error)

Start accepts incoming connections on the Listener

Jump to

Keyboard shortcuts

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