service

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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

func (s *Service) IsGrpcServerRunning() bool

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) StartServer

func (s *Service) StartServer()

StartServer starts a grpc server

func (*Service) StopServer

func (s *Service) StopServer()

StopServer stops a grpc server

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)

Jump to

Keyboard shortcuts

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