service

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: Apache-2.0 Imports: 12 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 *engine.DB) *Service

NewService returns a new grpc Service

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

func (s *Service) Get(ctx context.Context, req *dbs.GetRequest) (*dbs.GetResponse, error)

Get is a grpc s for get

func (*Service) IsGrpcServerRunning

func (s *Service) IsGrpcServerRunning() bool

IsGrpcServerRunning returns whether the grpc server is running

func (*Service) Keys

func (s *Service) Keys(ctx context.Context, req *dbs.KeysRequest) (*dbs.KeysResponse, error)

Keys is a grpc s for keys

func (*Service) Put

func (s *Service) Put(ctx context.Context, req *dbs.PutRequest) (*dbs.PutResponse, 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()

Jump to

Keyboard shortcuts

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