Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MsgPrefixFail for failed operation replies MsgPrefixFail = byte(0) // MsgPrefixSuccess for successful operation replies MsgPrefixSuccess = byte(1) )
View Source
const OK = ""
OK is a reply for successful but idempotent operations
View Source
const (
// Version for server
Version = "0.1.0"
)
Variables ¶
This section is empty.
Functions ¶
func ParseCommandInput ¶
ParseCommandInput parses command returns command and its argument array separately.
Types ¶
type Command ¶
type Command struct { ShortDescription string `json:"short"` Description string `json:"description"` Executor Executor `json:"-"` }
Command is a constituent of server language
type Interpreter ¶
type Interpreter struct {
// contains filtered or unexported fields
}
Interpreter interprets given string command and executes it on the server. Interpreter are not thread safe intentionally, so each routine must own an interpreter.
type Lexicon ¶
type Lexicon struct {
// contains filtered or unexported fields
}
A Lexicon consists of all commands of server
func (*Lexicon) CreateInterpreter ¶
func (l *Lexicon) CreateInterpreter() *Interpreter
CreateInterpreter creates new interpreter from clone of lexicon Note that interpreters not thread safe intentionally
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is Cardinality Cube Server
func NewServer ¶
func NewServer(cubeToServe *cube.Cube, endPoints string, processQueueSize int, responseQueueSize int, numProcessWorkers int) *Server
NewServer creates new server
Click to show internal directories.
Click to hide internal directories.