Documentation
¶
Index ¶
- type Service
- func (s *Service) Append(ctx context.Context, req *dbs.AppendRequest) (*dbs.AppendResponse, error)
- func (s *Service) Decr(ctx context.Context, req *dbs.DecrRequest) (*dbs.DecrResponse, error)
- func (s *Service) DecrBy(ctx context.Context, req *dbs.DecrByRequest) (*dbs.DecrByResponse, error)
- func (s *Service) Del(ctx context.Context, req *dbs.DelRequest) (*dbs.DelResponse, error)
- func (s *Service) Exists(ctx context.Context, req *dbs.ExistsRequest) (*dbs.ExistsResponse, error)
- func (s *Service) Expire(ctx context.Context, req *dbs.ExpireRequest) (*dbs.ExpireResponse, error)
- func (s *Service) Get(ctx context.Context, req *dbs.GetRequest) (*dbs.GetResponse, error)
- func (s *Service) GetSet(ctx context.Context, req *dbs.GetSetRequest) (*dbs.GetSetResponse, error)
- func (s *Service) Incr(ctx context.Context, req *dbs.IncrRequest) (*dbs.IncrResponse, error)
- func (s *Service) IncrBy(ctx context.Context, req *dbs.IncrByRequest) (*dbs.IncrByResponse, error)
- func (s *Service) IncrByFloat(ctx context.Context, req *dbs.IncrByFloatRequest) (*dbs.IncrByFloatResponse, error)
- func (s *Service) IsGrpcServerRunning() bool
- func (s *Service) Persist(ctx context.Context, req *dbs.PersistRequest) (*dbs.PersistResponse, error)
- func (s *Service) Put(ctx context.Context, req *dbs.SetRequest) (*dbs.SetResponse, error)
- func (s *Service) StartServer()
- func (s *Service) StopServer()
- func (s *Service) StrLen(ctx context.Context, req *dbs.StrLenRequest) (*dbs.StrLenResponse, error)
- func (s *Service) Type(ctx context.Context, req *dbs.TypeRequest) (*dbs.TypeResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { dbs.FlyDBServiceServer Addr string // db server address // contains filtered or unexported fields }
Service is a grpc Service for db
func NewService ¶
func NewService(addr string, db *structure.StringStructure) *Service
NewService returns a new grpc Service
func (*Service) Append ¶ added in v1.0.8
func (s *Service) Append(ctx context.Context, req *dbs.AppendRequest) (*dbs.AppendResponse, error)
func (*Service) Decr ¶ added in v1.0.8
func (s *Service) Decr(ctx context.Context, req *dbs.DecrRequest) (*dbs.DecrResponse, error)
func (*Service) DecrBy ¶ added in v1.0.8
func (s *Service) DecrBy(ctx context.Context, req *dbs.DecrByRequest) (*dbs.DecrByResponse, error)
func (*Service) Del ¶
func (s *Service) Del(ctx context.Context, req *dbs.DelRequest) (*dbs.DelResponse, error)
Del is a grpc s for del
func (*Service) Exists ¶ added in v1.0.8
func (s *Service) Exists(ctx context.Context, req *dbs.ExistsRequest) (*dbs.ExistsResponse, error)
func (*Service) Expire ¶ added in v1.0.8
func (s *Service) Expire(ctx context.Context, req *dbs.ExpireRequest) (*dbs.ExpireResponse, error)
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, req *dbs.GetRequest) (*dbs.GetResponse, error)
Get is a grpc s for get
func (*Service) GetSet ¶ added in v1.0.8
func (s *Service) GetSet(ctx context.Context, req *dbs.GetSetRequest) (*dbs.GetSetResponse, error)
func (*Service) Incr ¶ added in v1.0.8
func (s *Service) Incr(ctx context.Context, req *dbs.IncrRequest) (*dbs.IncrResponse, error)
func (*Service) IncrBy ¶ added in v1.0.8
func (s *Service) IncrBy(ctx context.Context, req *dbs.IncrByRequest) (*dbs.IncrByResponse, error)
func (*Service) IncrByFloat ¶ added in v1.0.8
func (s *Service) IncrByFloat(ctx context.Context, req *dbs.IncrByFloatRequest) (*dbs.IncrByFloatResponse, error)
func (*Service) IsGrpcServerRunning ¶
IsGrpcServerRunning returns whether the grpc server is running
func (*Service) Persist ¶ added in v1.0.8
func (s *Service) Persist(ctx context.Context, req *dbs.PersistRequest) (*dbs.PersistResponse, error)
func (*Service) Put ¶
func (s *Service) Put(ctx context.Context, req *dbs.SetRequest) (*dbs.SetResponse, error)
Put is a grpc s for put
func (*Service) StrLen ¶ added in v1.0.8
func (s *Service) StrLen(ctx context.Context, req *dbs.StrLenRequest) (*dbs.StrLenResponse, error)
func (*Service) Type ¶ added in v1.0.8
func (s *Service) Type(ctx context.Context, req *dbs.TypeRequest) (*dbs.TypeResponse, error)
Click to show internal directories.
Click to hide internal directories.