Documentation ¶
Index ¶
- Constants
- Variables
- func Compress(msg []byte) []byte
- func Decompress(cMsg []byte) []byte
- func PeekAPI(msg []byte) string
- type Authenticator
- type ConnPool
- func (pool *ConnPool) GetQueueCounter() int
- func (pool *ConnPool) Handle(qClient *QProcess) (int64, int64, string, error)
- func (pool *ConnPool) Put(q *QProcess)
- func (pool *ConnPool) Reload()
- func (pool *ConnPool) Revive()
- func (pool *ConnPool) Serving() error
- func (pool *ConnPool) Sync(k interface{}, args interface{}) error
- func (pool *ConnPool) Validate(API string) error
- type Engine
- type GeekErr
- type HandlerFunc
- type LogFormatter
- type LogParams
- type LoggerConfig
- type QProcess
Constants ¶
View Source
const ( GeekUser string = ".geek.user" GeekIP string = ".geek.ip" )
var names used on the q processes
View Source
const ( ASYNC byte = iota SYNC RESPONSE )
View Source
const ( K0 byte = 0 KB byte = 1 KJ byte = 7 KF byte = 9 KC byte = 10 KS byte = 11 KP byte = 12 XT byte = 98 XD byte = 99 )
View Source
const ( Wj = math.MaxInt64 Nj = math.MinInt64 )
Variables ¶
View Source
var ( ErrAuth = errors.New("geek: wrong credential?") ErrVersion = errors.New("geek: require version 3+ kdb+") ErrNotConnected = errors.New("geek: not connected") ErrMaxRetryTimesReached = errors.New("geek: maximum retry times reached") ErrNotAllowedAPI = errors.New("geek: not allowed API") ErrInvalidQuery = errors.New("geek: first item is not a symbol or null symbol") )
View Source
var ( RB = reflect.TypeOf([]bool{}) RJ = reflect.TypeOf([]int64{}) RF = reflect.TypeOf([]float64{}) RC = reflect.TypeOf([]byte{}) RS = reflect.TypeOf([]string{}) RT = reflect.TypeOf([]time.Time{}) RP = reflect.TypeOf([]timestamppb.Timestamp{}) R0 = reflect.TypeOf([][]byte{}) )
View Source
var ( Nf = math.NaN() Wf = math.Inf(1) )
View Source
var DefaultLogWriter io.Writer = os.Stdout
Functions ¶
func Decompress ¶ added in v0.0.7
Types ¶
type Authenticator ¶ added in v0.0.5
type ConnPool ¶ added in v0.0.5
type ConnPool struct { Conns map[int]*QProcess Timeout time.Duration ReviveInterval time.Duration DeadConns map[int]bool AllowedAPI map[string]bool RetryTimes int // contains filtered or unexported fields }
func NewConnPool ¶ added in v0.0.5
func NewConnPool() *ConnPool
func (*ConnPool) GetQueueCounter ¶ added in v0.0.5
type Engine ¶ added in v0.0.5
type Engine struct { Port int Auth Authenticator Pool *ConnPool Handler HandlerFunc }
func DefaultEngine ¶ added in v0.0.5
type HandlerFunc ¶
func LoggerWithConfig ¶ added in v0.0.5
func LoggerWithConfig(conf LoggerConfig) HandlerFunc
LoggerWithConfig instance a Logger middleware with config.
type LogFormatter ¶ added in v0.0.5
type LoggerConfig ¶ added in v0.0.5
type LoggerConfig struct { // Optional. Default value is geek.defaultLogFormatter Formatter LogFormatter // Output is a writer where logs are written. // Optional. Default value is geek.DefaultWriter. Output io.Writer }
Click to show internal directories.
Click to hide internal directories.