server

package
v0.0.0-...-bcdc46a Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CMD_PING       = "PING"
	CMD_CREATE_SVC = "CRT"
	CMD_DROP_SVC   = "DROP"
	CMD_QUIT       = "QUIT"
	CMD_UNIX_TS    = "TS"
	CMD_LIST       = "LIST"
	CMD_CTX        = "CTX"
	CMD_LOGLEVEL   = "LOGLEVEL"
	CMD_PANIC      = "PANIC"
	CMD_DBSTATS    = "DBSTATS"
)
View Source
const (
	SimpleServerType = "simple"
)

Variables

This section is empty.

Functions

func NewServer

func NewServer() apis.IServer

func Server

func Server(serverType string, serverAddress string) (apis.IServer, error)

Types

type ConnectionServer

type ConnectionServer struct {
	// contains filtered or unexported fields
}

func (*ConnectionServer) Shutdown

func (cs *ConnectionServer) Shutdown()

func (*ConnectionServer) Start

func (cs *ConnectionServer) Start()

func (*ConnectionServer) Stop

func (cs *ConnectionServer) Stop()

type FuncHandler

type FuncHandler func([]string) apis.IResponse

type QueueOpFunc

type QueueOpFunc func(req []string) error

type SessionHandler

type SessionHandler struct {
	// contains filtered or unexported fields
}

func NewSessionHandler

func NewSessionHandler(conn net.Conn, services *qmgr.ServiceManager) *SessionHandler

func (*SessionHandler) DispatchConn

func (s *SessionHandler) DispatchConn()

DispatchConn dispatcher. Entry point to start connection handling.

func (*SessionHandler) QuitListener

func (s *SessionHandler) QuitListener()

func (*SessionHandler) Stop

func (s *SessionHandler) Stop()

Stop the processing loop.

func (*SessionHandler) WriteResponse

func (s *SessionHandler) WriteResponse(resp apis.IResponse) error

WriteResponse writes apis.IResponse into connection writer.

Directories

Path Synopsis
dbdata
Package dbdata is a generated protocol buffer package.
Package dbdata is a generated protocol buffer package.
sqsmsg
Package sqsmsg is a generated protocol buffer package.
Package sqsmsg is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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