Documentation
¶
Index ¶
- type Command
- type Server
- func (s *Server) AddNode(c Command, fromClient bool) error
- func (s *Server) ClientHandler(conn net.Conn)
- func (s *Server) ConnController()
- func (s *Server) Del(c Command) error
- func (s *Server) DelNode(c Command) error
- func (s *Server) Get(c Command) ([]byte, error)
- func (s *Server) GetCmd(conn net.Conn) (Command, error)
- func (s *Server) Info() (string, error)
- func (s *Server) Init(args argparse.Args) error
- func (s *Server) Listen() (listenerClient net.Listener, listenerServer net.Listener)
- func (s *Server) MemController()
- func (s *Server) Serve()
- func (s *Server) ServeClient()
- func (s *Server) ServeServer()
- func (s *Server) ServerHandler(conn net.Conn)
- func (s *Server) Set(c Command) error
- func (s *Server) SetInNodes(c Command) error
- func (s *Server) SetKey(key string, value int64) error
- func (s *Server) SetReplicas(c Command) error
- func (s *Server) SetupArgs(args argparse.Args)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the main server struct.
var ServerInstance Server
ServerInstance is the main server instance.
func (*Server) ClientHandler ¶
ServerHandler is the main server handler.
func (*Server) ConnController ¶
func (s *Server) ConnController()
ConnController is the main connections controller.
func (*Server) MemController ¶
func (s *Server) MemController()
MemController is a function that controls the memory usage of the server.
func (*Server) ServeClient ¶
func (s *Server) ServeClient()
ServeClient starts the client connection handler loop.
func (*Server) ServeServer ¶
func (s *Server) ServeServer()
ServeServer starts the server connection handler loop.
func (*Server) ServerHandler ¶
ServerHandler is the main server handler.
func (*Server) SetInNodes ¶
SetInNodes is a function that sets a key-pair to nodes.
func (*Server) SetReplicas ¶
SetReplicas is a function that sets replicas number in a server
Click to show internal directories.
Click to hide internal directories.