cmd

package
v0.0.0-...-47e3ba9 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSyntaxIncorrect = errors.New("syntax err")

ErrSyntaxIncorrect incorrect err

View Source
var ExecCmd = make(map[string]ExecCmdFunc)

ExecCmd exec cmd map, saving all the functions corresponding to a specified command.

Functions

This section is empty.

Types

type ExecCmdFunc

type ExecCmdFunc func(*kvdb.RoseDB, []string) (interface{}, error)

ExecCmdFunc func for cmd execute.

type GrpcServer

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

func NewGrpcServer

func NewGrpcServer(db *kvdb.RoseDB) *GrpcServer

func (*GrpcServer) Append

func (g *GrpcServer) Append(_ context.Context, req *proto.AppendReq) (*proto.AppendRsp, error)

func (*GrpcServer) Expire

func (g *GrpcServer) Expire(_ context.Context, req *proto.ExpireReq) (*proto.ExpireRsp, error)

func (*GrpcServer) Get

func (g *GrpcServer) Get(_ context.Context, req *proto.GetReq) (*proto.GetRsp, error)

func (*GrpcServer) GetSet

func (g *GrpcServer) GetSet(_ context.Context, req *proto.GetSetReq) (*proto.GetSetRsp, error)

func (*GrpcServer) HClear

func (g *GrpcServer) HClear(_ context.Context, req *proto.HClearReq) (*proto.HClearRsp, error)

func (*GrpcServer) HDel

func (g *GrpcServer) HDel(_ context.Context, req *proto.HDelReq) (*proto.HDelRsp, error)

func (*GrpcServer) HExists

func (g *GrpcServer) HExists(_ context.Context, req *proto.HExistsReq) (*proto.HExistsRsp, error)

func (*GrpcServer) HExpire

func (g *GrpcServer) HExpire(_ context.Context, req *proto.HExpireReq) (*proto.HExpireRsp, error)

func (*GrpcServer) HGet

func (g *GrpcServer) HGet(_ context.Context, req *proto.HGetReq) (*proto.HGetRsp, error)

func (*GrpcServer) HGetAll

func (g *GrpcServer) HGetAll(_ context.Context, req *proto.HGetAllReq) (*proto.HGetAllRsp, error)

func (*GrpcServer) HKeyExists

func (*GrpcServer) HKeys

func (g *GrpcServer) HKeys(_ context.Context, req *proto.HKeysReq) (*proto.HKeysRsp, error)

func (*GrpcServer) HLen

func (g *GrpcServer) HLen(_ context.Context, req *proto.HLenReq) (*proto.HLenRsp, error)

func (*GrpcServer) HMGet

func (g *GrpcServer) HMGet(_ context.Context, req *proto.HMGetReq) (*proto.HMGetRsp, error)

func (*GrpcServer) HMSet

func (g *GrpcServer) HMSet(_ context.Context, req *proto.HMSetReq) (*proto.HMSetRsp, error)

func (*GrpcServer) HSet

func (g *GrpcServer) HSet(_ context.Context, req *proto.HSetReq) (*proto.HSetRsp, error)

func (*GrpcServer) HSetNx

func (g *GrpcServer) HSetNx(_ context.Context, req *proto.HSetNxReq) (*proto.HSetNxRsp, error)

func (*GrpcServer) HTTL

func (g *GrpcServer) HTTL(_ context.Context, req *proto.HTTLReq) (*proto.HTTLRsp, error)

func (*GrpcServer) HVals

func (g *GrpcServer) HVals(_ context.Context, req *proto.HValsReq) (*proto.HValsRsp, error)

func (*GrpcServer) LClear

func (g *GrpcServer) LClear(_ context.Context, req *proto.LClearReq) (*proto.LClearRsp, error)

func (*GrpcServer) LExpire

func (g *GrpcServer) LExpire(_ context.Context, req *proto.LExpireReq) (*proto.LExpireRsp, error)

func (*GrpcServer) LIndex

func (g *GrpcServer) LIndex(_ context.Context, req *proto.LIndexReq) (*proto.LIndexRsp, error)

func (*GrpcServer) LInsert

func (g *GrpcServer) LInsert(_ context.Context, req *proto.LInsertReq) (*proto.LInsertRsp, error)

func (*GrpcServer) LKeyExists

func (*GrpcServer) LLen

func (g *GrpcServer) LLen(_ context.Context, req *proto.LLenReq) (*proto.LLenRsp, error)

func (*GrpcServer) LPop

func (g *GrpcServer) LPop(_ context.Context, req *proto.LPopReq) (*proto.LPopRsp, error)

func (*GrpcServer) LPush

func (g *GrpcServer) LPush(_ context.Context, req *proto.LPushReq) (*proto.LPushRsp, error)

func (*GrpcServer) LRange

func (g *GrpcServer) LRange(_ context.Context, req *proto.LRangeReq) (*proto.LRangeRsp, error)

func (*GrpcServer) LRem

func (g *GrpcServer) LRem(_ context.Context, req *proto.LRemReq) (*proto.LRemRsp, error)

func (*GrpcServer) LSet

func (g *GrpcServer) LSet(_ context.Context, req *proto.LSetReq) (*proto.LSetRsp, error)

func (*GrpcServer) LTTL

func (g *GrpcServer) LTTL(_ context.Context, req *proto.LTTLReq) (*proto.LTTLRsp, error)

func (*GrpcServer) LTrim

func (g *GrpcServer) LTrim(_ context.Context, req *proto.LTrimReq) (*proto.LTrimRsp, error)

func (*GrpcServer) LValExists

func (*GrpcServer) Listen

func (g *GrpcServer) Listen(addr string)

func (*GrpcServer) MGet

func (g *GrpcServer) MGet(_ context.Context, req *proto.MGetReq) (*proto.MGetRsp, error)

func (*GrpcServer) MSet

func (g *GrpcServer) MSet(_ context.Context, req *proto.MSetReq) (*proto.MSetRsp, error)

func (*GrpcServer) Persist

func (g *GrpcServer) Persist(_ context.Context, req *proto.PersistReq) (*proto.PersistRsp, error)

func (*GrpcServer) PrefixScan

func (*GrpcServer) RPop

func (g *GrpcServer) RPop(_ context.Context, req *proto.RPopReq) (*proto.RPopRsp, error)

func (*GrpcServer) RPush

func (g *GrpcServer) RPush(_ context.Context, req *proto.RPushReq) (*proto.RPushRsp, error)

func (*GrpcServer) RangeScan

func (g *GrpcServer) RangeScan(_ context.Context, req *proto.RangeScanReq) (*proto.RangeScanRsp, error)

func (*GrpcServer) Remove

func (g *GrpcServer) Remove(_ context.Context, req *proto.RemoveReq) (*proto.RemoveRsp, error)

func (*GrpcServer) SAdd

func (g *GrpcServer) SAdd(_ context.Context, req *proto.SAddReq) (*proto.SAddRsp, error)

func (*GrpcServer) SCard

func (g *GrpcServer) SCard(_ context.Context, req *proto.SCardReq) (*proto.SCardRsp, error)

func (*GrpcServer) SClear

func (g *GrpcServer) SClear(_ context.Context, req *proto.SClearReq) (*proto.SClearRsp, error)

func (*GrpcServer) SDiff

func (g *GrpcServer) SDiff(_ context.Context, req *proto.SDiffReq) (*proto.SDiffRsp, error)

func (*GrpcServer) SExpire

func (g *GrpcServer) SExpire(_ context.Context, req *proto.SExpireReq) (*proto.SExpireRsp, error)

func (*GrpcServer) SIsMember

func (g *GrpcServer) SIsMember(_ context.Context, req *proto.SIsMemberReq) (*proto.SIsMemberRsp, error)

func (*GrpcServer) SKeyExists

func (*GrpcServer) SMembers

func (g *GrpcServer) SMembers(_ context.Context, req *proto.SMembersReq) (*proto.SMembersRsp, error)

func (*GrpcServer) SMove

func (g *GrpcServer) SMove(_ context.Context, req *proto.SMoveReq) (*proto.SMoveRsp, error)

func (*GrpcServer) SPop

func (g *GrpcServer) SPop(_ context.Context, req *proto.SPopReq) (rsp *proto.SPopRsp, err error)

func (*GrpcServer) SRandMember

func (*GrpcServer) SRem

func (g *GrpcServer) SRem(_ context.Context, req *proto.SRemReq) (*proto.SRemRsp, error)

func (*GrpcServer) STTL

func (g *GrpcServer) STTL(_ context.Context, req *proto.STTLReq) (*proto.STTLRsp, error)

func (*GrpcServer) SUnion

func (g *GrpcServer) SUnion(_ context.Context, req *proto.SUnionReq) (*proto.SUnionRsp, error)

func (*GrpcServer) Set

func (g *GrpcServer) Set(_ context.Context, req *proto.SetReq) (*proto.SetRsp, error)

func (*GrpcServer) SetEx

func (g *GrpcServer) SetEx(_ context.Context, req *proto.SetExReq) (*proto.SetExRsp, error)

func (*GrpcServer) SetNx

func (g *GrpcServer) SetNx(_ context.Context, req *proto.SetNxReq) (*proto.SetNxRsp, error)

func (*GrpcServer) Stop

func (g *GrpcServer) Stop()

func (*GrpcServer) StrExists

func (g *GrpcServer) StrExists(_ context.Context, req *proto.StrExistsReq) (*proto.StrExistsRsp, error)

func (*GrpcServer) TTL

func (g *GrpcServer) TTL(_ context.Context, req *proto.TTLReq) (*proto.TTLRsp, error)

func (*GrpcServer) ZAdd

func (g *GrpcServer) ZAdd(_ context.Context, req *proto.ZAddReq) (*proto.ZAddRsp, error)

func (*GrpcServer) ZCard

func (g *GrpcServer) ZCard(_ context.Context, req *proto.ZCardReq) (*proto.ZCardRsp, error)

func (*GrpcServer) ZClear

func (g *GrpcServer) ZClear(_ context.Context, req *proto.ZClearReq) (*proto.ZClearRsp, error)

func (*GrpcServer) ZExpire

func (g *GrpcServer) ZExpire(_ context.Context, req *proto.ZExpireReq) (*proto.ZExpireRsp, error)

func (*GrpcServer) ZGetByRank

func (*GrpcServer) ZIncrBy

func (g *GrpcServer) ZIncrBy(_ context.Context, req *proto.ZIncrByReq) (*proto.ZIncrByRsp, error)

func (*GrpcServer) ZKeyExists

func (*GrpcServer) ZRange

func (g *GrpcServer) ZRange(_ context.Context, req *proto.ZRangeReq) (*proto.ZRangeRsp, error)

func (*GrpcServer) ZRangeWithScores

func (*GrpcServer) ZRank

func (g *GrpcServer) ZRank(_ context.Context, req *proto.ZRankReq) (*proto.ZRankRsp, error)

func (*GrpcServer) ZRem

func (g *GrpcServer) ZRem(_ context.Context, req *proto.ZRemReq) (*proto.ZRemRsp, error)

func (*GrpcServer) ZRevGetByRank

func (*GrpcServer) ZRevRange

func (g *GrpcServer) ZRevRange(_ context.Context, req *proto.ZRevRangeReq) (*proto.ZRevRangeRsp, error)

func (*GrpcServer) ZRevRangeWithScores

func (*GrpcServer) ZRevRank

func (g *GrpcServer) ZRevRank(_ context.Context, req *proto.ZRevRankReq) (*proto.ZRevRankRsp, error)

func (*GrpcServer) ZRevScoreRange

func (*GrpcServer) ZScore

func (g *GrpcServer) ZScore(_ context.Context, req *proto.ZScoreReq) (*proto.ZScoreRsp, error)

func (*GrpcServer) ZScoreRange

func (*GrpcServer) ZTTL

func (g *GrpcServer) ZTTL(_ context.Context, req *proto.ZTTLReq) (*proto.ZTTLRsp, error)

type Server

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

Server a kvdb server.

func NewServer

func NewServer(config kvdb.Config) (*Server, error)

NewServer create a new kvdb server.

func NewServerUseDbPtr

func NewServerUseDbPtr(db *kvdb.RoseDB) *Server

func (*Server) Listen

func (s *Server) Listen(addr string)

Listen listen the server.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server.

type TxnList

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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